本文介绍了NetShareSetInfo()函数给出错误ERROR_INVALID_PARAMETER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这样做:



PSHARE_INFO_502 BufPtr;



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



使用res = 0成功获得BufPtr。但是当我把相同的BufPtr写成如下代码:



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



它给出的错误值为(parm_err = 501,即SHARE_FILE_SD_PARMNUM(shi502_security_descriptor)。

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.

推荐答案


这篇关于NetShareSetInfo()函数给出错误ERROR_INVALID_PARAMETER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 22:05