NetQueryDisplayInformation api call problem

  • Thread starter Thread starter Andrew Wiles
  • Start date Start date
A

Andrew Wiles

Any thoughts on why the following leads to a System.NullReferenceException?

long level = 1;

long index = 0;

long entriesRequested = 100;

long preferedMaximumLength = 30000;

IntPtr bufptr = new IntPtr(preferedMaximumLength);

ArrayList arrayUsers = new ArrayList();

string sName = \\myservername;

int hResult = NetQueryDisplayInformation(sName, level, index,
entriesRequested, preferedMaximumLength, out bufptr);
 
Andrew,
Any thoughts on why the following leads to a System.NullReferenceException?

You're using long parameters - they should probably be ints instead.

Also, according to my documentation NetQueryDisplayInformation takes 7
parameters, but I only see you pass in 6.



Mattias
 
Back
Top