on 3/10/06 3:25 AM, Kristof Coene at [EMAIL PROTECTED] wrote:

> Hi guys,
> 
> I'm pretty new to the RealBasicPlugin-scene, working on my first plug-in for
> windows and Mac.
> But I have a problem: for windows, I made a DLL in C++ that the plugin can
> copy to a specific location,
> and I also need a .txt file in the same directory as the DLL. Now, my DLL
> needs the information of the
> .txt file to work properly, but it seems that I cannot get the path where
> the DLL is in.
> Is there any way to let the DLL know in wich path it is in?
> I used
> 
> CreateFile("test.txt", GENERIC_READ, 0, NULL, OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL, NULL);
> 
> but that directs me to C:\documents and settings\Administrator\test.txt
> while my DLL is in another drectory.
> Can you guys help me?

In the DllMain method you can call GetModuleFileName to get the path to the
DLL.

Chris


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to