Click to See Complete Forum and Search --> : types in C++
phirestalker
March 18th, 2003, 12:15 AM
wheres the best place to find the type equivalents for some of the C++ #define types like for instance WORD
also what would be the best way to make this c++ struct member a c# struct member??
void (CALLBACK *ncb_post)( struct _NCB * );
it's from the NCB structure in nb30.h
pareshgh
March 18th, 2003, 11:35 AM
check this out,
Keyword Equals - MSDN topic (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxorilanguageequivalentskeywords.asp)
call backs can be solved by using proper use of delegates.
for example when you write a thread or
when u implement a event then its really a call back to method just like
envoking Pointer to a Function. and invoking method. in C++ its usually known as callbacks. in C# its been implemented as Delegates.
Paresh
phirestalker
March 18th, 2003, 07:01 PM
could u give an example of how to use a delegate for it? :D
also from NCB struct of nb30.h
HANDLE ncb_event;
how would u redifine HANDLE type in c#, my guess is IntPtr, however I looked at the definition for HANDLE in C++ and it looks complicated :confused: so I'm not sure
bfarley
March 19th, 2003, 11:26 AM
IntPtr is correct
Bill F
pareshgh
March 19th, 2003, 01:53 PM
do you still want the sample of delegate or u got it.
Paresh
phirestalker
March 19th, 2003, 02:33 PM
I think I got it however now I'm stumped on something else, I'm tryin to make a c# class that has functions that use the Netbios API call but it won't let me do what I wanted, how would I get it to work, the code is attatched
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.