Click here to Skip to main content
15,923,168 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalpropertygrid Pin
ingwaar30-Mar-05 19:32
ingwaar30-Mar-05 19:32 
Generalbug on .net framework or... Pin
Member 73061930-Mar-05 19:21
Member 73061930-Mar-05 19:21 
GeneralRe: bug on .net framework or... Pin
Christian Graus31-Mar-05 13:31
protectorChristian Graus31-Mar-05 13:31 
GeneralGetting Exception while importing excel file and creating table with it! Pin
nupur_j30-Mar-05 19:19
nupur_j30-Mar-05 19:19 
GeneralHelp writing a function Pin
THerman30-Mar-05 17:07
THerman30-Mar-05 17:07 
GeneralRe: Help writing a function Pin
rwestgraham30-Mar-05 17:40
rwestgraham30-Mar-05 17:40 
GeneralRe: Help writing a function Pin
THerman31-Mar-05 3:08
THerman31-Mar-05 3:08 
GeneralRe: Help writing a function Pin
rwestgraham1-Apr-05 13:06
rwestgraham1-Apr-05 13:06 
THerman wrote:
Microsoft does it with the NetServerEnum itself. There is only one function, but when you pass the level it knows to use the appropriate structure.

What the API does is pack all the data into a single byte array. Since each structure contains only DWORDs and LPWSTR pointers, they are always a fixed size - either 8 bytes or 24 bytes. (You are lucky, since each structure in this case is already DWORD aligned, you should not have to worry about padding bytes between structures).

The API splits the byte stream at the appropriate lengths based on level and puts each structure into an array.

This is easy to do in C++. Not so easy in NET.

Look at this website - search for "netenumserver" under the appropriate library section. There is an example of using the NetServerEnum API in C#.

http://pinvoke.net/[^]

Robert
GeneralDocking Forms Pin
cpod30-Mar-05 16:18
cpod30-Mar-05 16:18 
GeneralRe: Docking Forms Pin
Mr Dabbah1-Apr-05 9:20
Mr Dabbah1-Apr-05 9:20 
GeneralIntercepting a print job Pin
tempgp30-Mar-05 14:58
tempgp30-Mar-05 14:58 
GeneralRe: Intercepting a print job Pin
Dave Kreskowiak30-Mar-05 15:40
mveDave Kreskowiak30-Mar-05 15:40 
GeneralRe: Intercepting a print job Pin
tempgp30-Mar-05 15:50
tempgp30-Mar-05 15:50 
GeneralRe: Intercepting a print job Pin
Dave Kreskowiak31-Mar-05 1:59
mveDave Kreskowiak31-Mar-05 1:59 
GeneralCursors and threads Pin
PaleyX30-Mar-05 12:27
PaleyX30-Mar-05 12:27 
GeneralRe: Cursors and threads Pin
Dave Kreskowiak30-Mar-05 15:02
mveDave Kreskowiak30-Mar-05 15:02 
GeneralRe: Cursors and threads Pin
PaleyX30-Mar-05 23:03
PaleyX30-Mar-05 23:03 
GeneralCrystal Reports problem with OLE images from Access DB Pin
KRadtke30-Mar-05 10:43
KRadtke30-Mar-05 10:43 
Generalclient server application Pin
sam_pune30-Mar-05 2:43
sam_pune30-Mar-05 2:43 
GeneralRe: client server application Pin
Christian Graus30-Mar-05 11:56
protectorChristian Graus30-Mar-05 11:56 
GeneralBest choice for data Pin
Mega130-Mar-05 1:26
Mega130-Mar-05 1:26 
GeneralRe: Best choice for data Pin
Christian Graus30-Mar-05 11:57
protectorChristian Graus30-Mar-05 11:57 
Generalinsert procedure in exe project Pin
a_yosef29-Mar-05 23:59
a_yosef29-Mar-05 23:59 
GeneralRe: insert procedure in exe project Pin
Dave Kreskowiak30-Mar-05 4:13
mveDave Kreskowiak30-Mar-05 4:13 
GeneralRe: insert procedure in exe project Pin
Christian Graus30-Mar-05 11:58
protectorChristian Graus30-Mar-05 11:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.