CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: types in C++

  1. #1
    Join Date
    Feb 2003
    Location
    Oklahoma City, OK
    Posts
    63

    types in C++

    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
    Last edited by phirestalker; March 18th, 2003 at 01:44 AM.

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    check this out,
    Keyword Equals - MSDN topic

    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
    - Software Architect

  3. #3
    Join Date
    Feb 2003
    Location
    Oklahoma City, OK
    Posts
    63
    could u give an example of how to use a delegate for it?

    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 so I'm not sure
    Last edited by phirestalker; March 19th, 2003 at 01:59 AM.

  4. #4
    Join Date
    May 2002
    Location
    Florida USA
    Posts
    27
    IntPtr is correct

    Bill F

  5. #5
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    do you still want the sample of delegate or u got it.

    Paresh
    - Software Architect

  6. #6
    Join Date
    Feb 2003
    Location
    Oklahoma City, OK
    Posts
    63
    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
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured