Click here to Skip to main content
15,922,894 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: c,c++ Pin
Dave Kreskowiak31-Mar-05 2:18
mveDave Kreskowiak31-Mar-05 2:18 
GeneralRe: c,c++ Pin
Colin Angus Mackay31-Mar-05 4:37
Colin Angus Mackay31-Mar-05 4:37 
GeneralRe: c,c++ Pin
Dave Kreskowiak31-Mar-05 5:44
mveDave Kreskowiak31-Mar-05 5:44 
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 
I need some help. I'm trying to construct a function in the best manner.

I have a class. This class wraps several API function calls. The function in question wraps NetServerEnum. As many of you know, NetServerEnum has a paramter called "level" this parameter dictates the level (amount and type) of information retrieved on each server.

Rather then creating multiple functions for each level I wanted to create one function that the code could call, passing what level to use. This part is fairly easy. Create a public enum in the class which sets the level value to 100 or 101 respectively. Now, where I run into the problem is the structure. The data returned from the function for each level has a different structure.

I have 2 structures that represent the levels and I have a class for each level that will hold the collected data.

I have no problem getting any of this to work if I limit the function to dealing with just one level. I'm not sure how to write the function to handle both levels. I've tried initially setting a variable to object then using DirectCast to cast the object to the correct structure based on the level passed. This just doesn't seem to be working right. Could someone please help me set this up properly???
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 
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 

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.