Creating the resource file

The resource file will look like this:

1 DLL_HEADER PRELOAD DISCARDABLE
BEGIN
	"Add\0",
	"UCase\0",
	"\0"
END

Add DLL_HEADER PRELOAD DISCARDABLE
BEGIN
    	"\0",
    	"V\0",
    	"A\0",
	"Add\r\n",
	"\0"
END

UCase DLL_HEADER PRELOAD DISCARDABLE
BEGIN
    	"\0",
    	"V\0",
    	"A\0",
	"UCase\r\n",
	"\0"
END

Note the "A" parameter in the list of arguments for the functions. This must be the first argument. Compile this .rc file into a .res file and add it to the project. Refer back to the first example if you are unsure of how to do this. Compile the dll.

Start a new APW file and load the functions. You won't have to enter details about the functions this time. To use the functions, add this code to a calc icon.

res := 0
num1 := 4
num2 := 8
Add()

str := "hello"
UCase()

Note that now you don't have to pass the WindowHandle to the functions.

Back to: Finding the Authorware window      Start