Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Gurus*
Posted

Yes, with some differences, caused by the differences in datatypes in .net. There are samples in the framework sdk and documentation on it in the msdn help.

 

It doesn't usually get a lot more complicated than changing Long for Integer or IntPtr.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • 1 month later...
Posted
But how about getting the data from the buffer. With NetUserGetInfo under VB6 you used to have to call the MoveMemory API and then convert the Pointers to Unicode strings etc......how do you go about doing that in VB .NET??
Posted

Derek,

 

I've actually been toying with this problem all week ad it was getting very frustrating.

 

I was trying to use the NetUserGetInfo API to return user info from our NT Domain.

 

Finally, clarity came yesterday afternoon and , as you say, with a little bit of help from Marshal.PtrToStructure and Marshal.StructureToPtr, success arrived!! Woohoo!! :)

 

....so much easier under .NET once you understand the new syntax.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...