Excel: Crashes/Unexpectedly Quits When Calling Code ResourceID: Q51095
|
Microsoft Excel can call routines that have been compiled as code
resources (sometimes referred to as dynamic link libraries, or DLLs).
If Excel crashes or unexpectedly quits when calling the code resource,
make sure the routine runs correctly by compiling it as an application
and running it stand alone. You may need to hard-code values that
would normally be passed from Excel. After verifying that the routine
runs as expected as an application, recompile the routine as a code
resource.
The most common cause of Excel crashing when calling a code resource
is incorrectly passed parameters. If the return type is incorrectly
specified (such as declaring a pointer to a floating-point value and
returning an integer), volatile information may be overwritten when
the code resource tries to pass the value back to Excel. This may
result in a system hang or Excel unexpectedly quitting. Check the
passed and returned argument types in the REGISTER command function.
The number and type of arguments passed must match those specified in
the REGISTER command function, with the type passed back to Excel
appearing first. The argument_types specified in the REGISTER command
function must be enclosed in quotation marks.
For more information on code resources, query on the following words:
description and creating and code resource and call register and
routine and floating and point and decimal
Additional query words:
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 15, 1999