473,837 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

call functions by pointer?

Can i call functions of a win32.dll by pointer?
It's in a ASP.NET (2.0) surrounding.
I wonder if it's still possible to do this.

(Using GetProcAddress( ) API and such)

Thanks,
Jan 5 '06 #1
2 1242
Hi Edwin,

Are you talking about Platform Invocation Services (PInvoke)?

http://msdn.microsoft.com/library/de...keTutorial.asp

"Edwin Knoppert" <in**@pbsoft.sp eedlinq.nl> wrote in message
news:dp******** **@azure.qinip. net...
Can i call functions of a win32.dll by pointer?
It's in a ASP.NET (2.0) surrounding.
I wonder if it's still possible to do this.

(Using GetProcAddress( ) API and such)

Thanks,

Jan 6 '06 #2
Aah, i been pointed to that topic earlier but now i see a recognizable item
at the bottom:

typedef void (__stdcall *PFN_MYCALLBACK )();
int __stdcall MyFunction(PFN_ MYCALLBACK callback);

I hope this is what i need, note that i don't (not really) know the
functionname, i only have a pointer and a description.
If you have a tip for me at this time, please do, i'll check this myself
later.

"Ken Cox - Microsoft MVP" <BA**********@h otmail.com> schreef in bericht
news:us******** ******@TK2MSFTN GP12.phx.gbl...
Hi Edwin,

Are you talking about Platform Invocation Services (PInvoke)?

http://msdn.microsoft.com/library/de...keTutorial.asp

"Edwin Knoppert" <in**@pbsoft.sp eedlinq.nl> wrote in message
news:dp******** **@azure.qinip. net...
Can i call functions of a win32.dll by pointer?
It's in a ASP.NET (2.0) surrounding.
I wonder if it's still possible to do this.

(Using GetProcAddress( ) API and such)

Thanks,


Jan 6 '06 #3

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

Similar topics

4
2000
by: Ganesh Kundapur | last post by:
Hi all, suppose i have 100 functions such as f1, f2,...f100 in a single file including main. If i pass arguement to main such as $a.out f1 main should call appropriate functions. I can do this using switch statement, but if i have 1000 functions, then i have to write 1000 cases OR i can use pointer to functions. I am passing string to main, how to map this string to function efficiently.
35
10811
by: hasho | last post by:
Why is "call by address" faster than "call by value"?
26
3144
by: Adam Warner | last post by:
Hello all, I'm very new to C but I have a number of years of Common Lisp programming experience. I'm trying to figure out ways of translating higher order concepts such as closures into C. The code will not be idiomatic C. GCC has an extension to ISO C that permits nested functions: <http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html> For implementing closures they have a serious limitation:
3
2680
by: John Smith | last post by:
I wrote some code in C in a dll which I would like to call from C#. However I'm stuck because of the strongly typed behavior of C# which makes limitations. Here are the prototypes for two functions which I have trouble mapping: int _SetOption(int nOption, void *pSetting); void *_GetDataField(int nType, int *npLength);
6
1657
by: Mark Jerde | last post by:
I need to call a Win32 DLL. The API supports both Windows and Linux, but I'm only concerned with Windows. I'd like advice whether I can use C# or whether I'll have to dust off my old C++ books. I would prefer to learn C# rather than go back to C++. The API starts with #ifdef (WIN32) #define MyAPI __stdcall #else
20
4969
by: alexandre.braganti | last post by:
Hello, First sorry for my poor English, I am French ;-) I've got a comprehension problem of what happend in one of the project i'm working on. Basically I've got a class gs_object than has got a VIRTUAL function createList(). This createList() function is overloaded in another class named ct_server that inherits gs_object. in my code, it looks something like that :
0
5429
by: Mike S | last post by:
I've seen examples of using the CallWindowProc Windows API function to call functions through their addresses in VB6 -- a clever workaround to emulate C-like function pointer semantics. A well-known example is the use of CallWindowProc to call a function gotten via LoadLibrary/GetProcAddress. For example, I've seen code similar to the following which can register/unregister a COM DLL where the path to the DLL is known only at runtime -- in...
11
2749
by: Felix Kater | last post by:
Hi, I can compile and run this code (see below) which twice calls the function f, first with too less, second with too much arguments. But is it legal and free of memory leaks and other problems? Of course, I presume that inside f I don't access i in case it was called via g. int f(int i){ /* ... */ return 0; }
9
7013
by: Allen | last post by:
The arguments of function is variable. Given function address, argument type and data, how to dynamically call the function? The following is pseudo code. int count = 0; int offset = 0; char buffer; count = getcount(buffer, offset); void* pfun = getmethod(buffer, offset);
12
7227
by: Rahul | last post by:
Hi Everyone, I have the following code and i'm able to invoke the destructor explicitly but not the constructor. and i get a compile time error when i invoke the constructor, why is this so? class Trial { public: Trial() {
0
9696
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10583
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10288
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7824
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7014
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5680
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4481
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.