realbasic-plugins
[Top] [All Lists]

Re: Path of DLL

To: "REALbasic Plugins" <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Path of DLL
From: "Kristof Coene" <kristofcoene at gmail dot com>
Date: Mon, 13 Mar 2006 11:06:41 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=hpDu44JXptw7vBR8s13rlv1b+wXpyDMmwFMZja6rRCkR/8hxBBegrm7s0CaegOQuUvb+r8n57KuesYAibgLXGllkDkRW/Zmgc/utEGmm/LAOGFefDJqIrHoCiZGvzhYoucm3thYnkNIrsxaZYu+6ax0WKEfhchZLGNG5ZEy/jyg=
References: <b549a0c70603100025w75bca3c0u at mail dot gmail dot com> <C036E608 dot 15C02%cslittle at mac dot com>
Thanks Chris, it really helped me out, now the DLL is up and working. There
is only one problem left: I want to have the abilit to have more than 1 of
the DLL file on 1 computer, but since it is hooked up to 1 GUID, there can
only be one working, so I want to have that each dll file has it's own GUID,
but the only way I know is (for VC 6.0) to go to the .idl file, change the
GUID manually and compile the DLL again; Isn't there a more dynamic method
for this?

2006/3/10, Chris Little <cslittle at mac dot com>:
>
> on 3/10/06 3:25 AM, Kristof Coene at kristofcoene at gmail dot com 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>
>
_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>