Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am doing like this:

PSHARE_INFO_502 BufPtr;

res = NetShareGetInfo((CComBSTR)strComputer,lpszShare,502,(LPBYTE *) &BufPtr;

get BufPtr successfully with res=0.But when I put the same BufPtr like below code:

res = NetShareSetInfo((CComBSTR)strComputer,lpszShare,502, (LPBYTE)&BufPtr, &parm_err);

It gives error with the value of (parm_err = 501 which is SHARE_FILE_SD_PARMNUM(shi502_security_descriptor).

so please tell me what's wrong with this security descriptor.
Posted
Comments
[no name] 29-Sep-14 7:12am    
There is nothing wrong with the security descriptor. You are calling a function that takes 4 arguments with 5 parameters.

1 solution

 
Share this answer
 
Comments
Member 10093229 30-Sep-14 2:10am    
But I am providing same buffer which one I got from NetShareGetInfo function,and I think in this buffer security descriptor is arranged.Please help.
Richard MacCutchan 30-Sep-14 3:19am    
Sorry, but I have no idea what may be happening. You will need to use your debugger to check which values may be incorrect.
Member 10093229 30-Sep-14 5:57am    
during debug the error is related to security descriptor.
parm_err = 501 which is SHARE_FILE_SD_PARMNUM(shi502_security_descriptor).
Richard MacCutchan 30-Sep-14 6:07am    
Sorry, but you have already told us that, and I am afraid that it does not help to diagnose your problem. You need to find out why you are receiving that error message. It is possible that you do not have administrative rights on you system, but that is only a guess.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900