473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

get function name for the GetProcAddress function

I am trying to call a fuction a a C# dll using the
GetProcAddress, but the returned handle is null, wheras
the LoadLibrary of the container dll succeeds, I write
the function name as it is written in ducumentaion, I
tried to use dumpin, but it doesn't show any method name.
what does this mean and how I can call this fucntion
Nov 16 '05 #1
1 3146
DMamoun,

You aren't going to be able to do this, because you have no way of
dereferencing the pointer that GetProcAddress returns. However, the next
version of .NET will allow you to define a delegate, and then call that
delegate when given the pointer in memory to a function (this will be done
through the Marshal class).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DMamoun" <an*******@discussions.microsoft.com> wrote in message
news:1b****************************@phx.gbl...
I am trying to call a fuction a a C# dll using the
GetProcAddress, but the returned handle is null, wheras
the LoadLibrary of the container dll succeeds, I write
the function name as it is written in ducumentaion, I
tried to use dumpin, but it doesn't show any method name.
what does this mean and how I can call this fucntion

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: ZhangZQ | last post by:
if there is a function in a win32 dll, it is definition is int add(int a, int b); how to define that function pointer in C#? thank you very much!
10
by: Dirk Vanhaute | last post by:
I have only small knowledge of c++, but I would like to compile the example in http://support.microsoft.com/kb/q246772/ HOWTO: Retrieve and Set the Default Printer in Windows I included "#include...
2
by: Harkos | last post by:
Hello, I have some code using LoadLibrary, GetProcAddress and FreeLibrary methods of Win32 API. I can correctly load and dispose any native DLL and even retrieve the function pointer with...
2
by: Jason Bell | last post by:
I know this functionality already exists in .NET 2.0 via Marshal.GetDelegateForFunctionPointer, but I'd rather not force my users to use a beta framework (not to mention the fact that I'm still...
3
by: AK | last post by:
I'm using a .NET Windows Forms Applications project. I'm using LoadLibrary & GetProcAddress to use a DLL function. This is all done in the main cpp file. I would like to use this DLL function in a...
1
by: Lloyd Dupont | last post by:
I have some managed C++ interacting with native DLL, for good integration I'm setting up some function pointer in the native DLL, passing some function pointer from the managed world....
14
by: Alan | last post by:
Good afternoon, I'm having difficulties loading a dll in Microsoft Visual Studio 2003, that was supplied to me by another company. They have supplied me with test code, which causes my program...
11
by: dolphin | last post by:
Hi All! I have a question that how to call a function just using a string. For example There is a .cpp file named a.cpp.There are some functions::fun1() fun2() fun3(). I have another fucntion...
2
by: AS | last post by:
Hi , I have exported the following function from a dll , extern "C" DECL_MYEXPORTS LRESULT CALLBACK MouseProc(int nCode,WPARAM wParam,LPARAM lParam); //in my calling code , I tried to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.