POV-Ray : Newsgroups : povray.programming : GUI Extension Problem : Re: GUI Extension Problem Server Time
29 Jul 2024 04:18:34 EDT (-0400)
  Re: GUI Extension Problem  
From: Ron Parker
Date: 1 Oct 1998 12:32:22
Message: <3613a086.0@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.