|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I'm trying to write a gui extension for POVRAY. I've gotten the example
code to work under VC5.0 EXCEPT for the About dialog. It appears the
DllEntryPoint is not being called. Since it's not, the hInstance is
uninitialized causing the call to create the dialog from the IDD_ABOUT
resource to fail. If I understand the LoadLibrary call, it's suppose to
call DllEntryPoint. I've tried adding the file to the .DEF, but no luck.
Also, does anyone know how to use the __declspec(dllexport) directive
instead of a separate DEF file?
Thanks in advance,
Winefred
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 1 Oct 1998 10:39:53 -0500, Winefred Washington
<wwa### [at] compuservecom> wrote:
>I'm trying to write a gui extension for POVRAY. I've gotten the example
>code to work under VC5.0 EXCEPT for the About dialog. It appears the
>DllEntryPoint is not being called. Since it's not, the hInstance is
>uninitialized causing the call to create the dialog from the IDD_ABOUT
>resource to fail. If I understand the LoadLibrary call, it's suppose to
>call DllEntryPoint. I've tried adding the file to the .DEF, but no luck.
The default entry point has changed from DllEntryPoint to DLLMain.
If you still want to use DllEntryPoint, you can specify the entry
point in the Project settings box, under the Link tab in the Output
category. To get there, right-click on your project, select Settings,
choose "All configurations" from the "Settings for" dropdown, pick the
link tab, choose "Output" from the "Category" dropdown, and enter
DllEntryPoint in the "Entry-point Symbol" box.
If you don't want to do that, or if it's easier to just rename your
entrypoint function, here is the new prototype:
BOOL WINAPI DLLMain( HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpReserved );
>Also, does anyone know how to use the __declspec(dllexport) directive
>instead of a separate DEF file?
Here's an example of a function declaration using declspec:
__declspec( dllexport ) void MyFunction( void )
You'll want to do this in both the prototype and the actual definition of the
function.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron,
Thanks for your help. I changed the name and the procedure is now being
called.
Ron Parker wrote in message <3613a086.0@news.povray.org>...
>>Also, does anyone know how to use the __declspec(dllexport) directive
>>instead of a separate DEF file?
>
>Here's an example of a function declaration using declspec:
>
>__declspec( dllexport ) void MyFunction( void )
>
>You'll want to do this in both the prototype and the actual definition of
the
>function.
>
I tried using the declspec shown below:
__declspec(dllexport) DWORD WINAPI PovGuiExtensionGetPointers (int RecSize,
GuiPointerBlock *PointerBlock)
but I get the Init message failure because PovRay cannot find the address of
PovGuiGetPointer routine. The guidemo file
does not have the routine prototyped.
Winefred
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 1 Oct 1998 16:27:10 -0500, "Winefred Washington"
<wwa### [at] compuservecom> wrote:
>I tried using the declspec shown below:
>
>__declspec(dllexport) DWORD WINAPI PovGuiExtensionGetPointers (int RecSize,
>GuiPointerBlock *PointerBlock)
>
>but I get the Init message failure because PovRay cannot find the address of
>PovGuiGetPointer routine. The guidemo file
>does not have the routine prototyped.
Which is it? PovGuiGetPointer or PovGuiExtensionGetPointers? I'm
guessing it's the longer one and you just didn't want to type it
twice.
One thing that can make a difference is the parameter-passing
scheme that you're using. WINAPI is different from cdecl or
fastcall. Maybe you should drop the WINAPI and see if it
helps, though I suspect that since POV looks up the routine by
name, your best bet is to just continue using the def file.
Your compiler is likely to "mangle" the name by putting an
underscore on the front of it.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|