Hello all,
I'm using Borlands Tasm32 (v5.0) and just ran into a situation where I had
to call 'DllGetVersion' inside ComCtl32. The problem is that that function exists in several other DLLs (shell32 to name another).
IOW, although I can write 'call DllGetVersion, ...' I never know which DLL will actually get called.
My question:
Does anyone here know if Tasm32 knows an assemble-time syntax to call a function from a specific DLL ? (would be handy for a few other functions too)
Remarks:
I currently used the runtime "LoadLibary", "GetProcAddress" solution, but thats cumbersome.
I could also rename the function itself (from "DllGetVersion" to something like "ComCtl32_GetVersion") and rebuild the libarary, but thats a ... well, not a solution I'd really like either.
Regards,
Rudy Wieser
P.s.
Anyone knows where I can find ComCtl32 v6.x ?
I'm using Borlands Tasm32 (v5.0) and just ran into a situation where I had >to call 'DllGetVersion' inside ComCtl32. The problem is that that function >exists in several other DLLs (shell32 to name another).
:
Does anyone here know if Tasm32 knows an assemble-time syntax to call a >function from a specific DLL ? (would be handy for a few other functions >too)
:
I currently used the runtime "LoadLibary", "GetProcAddress" solution, but >thats cumbersome.
:
Regards,
Rudy Wieser
P.s.
Anyone knows where I can find ComCtl32 v6.x ?
Sorry, I never used Tasm (any version), but WRT to GetProcAddress
I don't believe there is any other way to guarantee you will get
the right function.
If you know the DLL is already resident you should use GetModuleHandle instead of LoadLibrary.
George,
Sorry, I never used Tasm (any version), but WRT to GetProcAddress
I don't believe there is any other way to guarantee you will get
the right function.
There is, and I mentioned it just below the 'GetProcAddress' method.
If you know the DLL is already resident you should use GetModuleHandle
instead of LoadLibrary.
Does it make a difference ? (whats the 'should' about ?)
Regards,
Rudy Wieser
I don't believe there is any other way to guarantee you will get
the right function.
There is, and I mentioned it just below the 'GetProcAddress' method.
Yes, but it involved recompiling the module.
Most people are not in a position to rebuild system DLLs,
so that isn't a general solution.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 01:17:20 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,187 |