newbie help- creating windows "extension" dll 
Author Message
 newbie help- creating windows "extension" dll

I am  trying to convert a Solaris extension library for Tcl over to a
windows DLL without much success.  On the surface this would seem to be
fairly simple, yet the load of the dll does not find a particular
function.  This is actually being used in StoryServer where a command
like [DLOAD "dll/libname" "initfunct"] is used.

So the qustion really is, are there any FAQ's that might give me more
help on how to create this dll?  Are there any examples that would show
how to create a windows dll?

Mark Ranum
BORN

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 05 Apr 2003 03:00:00 GMT  
 newbie help- creating windows "extension" dll

Quote:

> I am  trying to convert a Solaris extension library for Tcl over to a
> windows DLL without much success.  On the surface this would seem to be
> fairly simple, yet the load of the dll does not find a particular
> function.  This is actually being used in StoryServer where a command
> like [DLOAD "dll/libname" "initfunct"] is used.

Your initfunct has to be declared as __declspec(dllexport), or else
no one from the outside can call it.

Greetings,

--
Michael Teske
"My opinions are not necessarily understandable."  



Sat, 05 Apr 2003 03:00:00 GMT  
 newbie help- creating windows "extension" dll
Michael,

Thanks for responding.  I have declared this function this way as in:

__declspec(dllexport) int __cdecl Test(Tcl_Interp * interp) {

That seemed to have made no difference though, which is weird.

Mark



Quote:

> > I am  trying to convert a Solaris extension library for Tcl over to
a
> > windows DLL without much success.  On the surface this would seem
to be
> > fairly simple, yet the load of the dll does not find a particular
> > function.  This is actually being used in StoryServer where a
command
> > like [DLOAD "dll/libname" "initfunct"] is used.

> Your initfunct has to be declared as __declspec(dllexport), or else
> no one from the outside can call it.

> Greetings,

> --
> Michael Teske
> "My opinions are not necessarily understandable."

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 05 Apr 2003 03:00:00 GMT  
 newbie help- creating windows "extension" dll

Quote:

> Michael,

> Thanks for responding.  I have declared this function this way as in:

> __declspec(dllexport) int __cdecl Test(Tcl_Interp * interp) {

> That seemed to have made no difference though, which is weird.

Hmm, what's the exact error message and how do you load the dll in tcl exactly?

--
Michael Teske
"My opinions are not necessarily understandable."  



Sun, 06 Apr 2003 03:00:00 GMT  
 newbie help- creating windows "extension" dll
Well I figured it out.  Apparently I have to add extern "C" to the
front of the exportable function.  Thanks for your help though!

Mark



Quote:

> > Michael,

> > Thanks for responding.  I have declared this function this way as
in:

> > __declspec(dllexport) int __cdecl Test(Tcl_Interp * interp) {

> > That seemed to have made no difference though, which is weird.

> Hmm, what's the exact error message and how do you load the dll in
tcl exactly?

> --
> Michael Teske
> "My opinions are not necessarily understandable."

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 06 Apr 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. "system" extension on Windows

2. tcl "grandchild" processes creating cmd windows

3. Help Getting "mspdbX0.dll" for HLA

4. HELP - I'm a "newbie"

5. NEWBIE:Need Help with "Path"

6. Newbie help with [] {} and ""

7. Socket Help "Socket Newbie"

8. Can anyone help a "newbie"?

9. Windows "Help" Generators

10. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

11. Newbie question: What's the difference between "create" and "creation"?

12. Newbie Needs Help With Creating DLL

 

 
Powered by phpBB® Forum Software