robin73
2010-05-24 10:19:01 UTC
I am using a Windows Xp platform (IT), with MSDK (v. 7.0A) and WinDDK (v.
7600.16385.0) installed on.
I am executing the following lines code:
LUID Luid;
if ( !LookupPrivilegeValue(NULL,SE_CREATE_SYMBOLIC_LINK_NAME,&Luid) )
{
DWORD err_code = GetLastError();
LPTSTR str_msg = NULL;
if ( FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, HRESULT_FROM_SETUPAPI (err_code), MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT), (LPTSTR) &str_msg, 0, NULL ) )
{
_tprintf(_T("ERR: (%u) - [%s]\n"), err_code, str_msg );
LocalFree(str_msg);
}
}
else
_tprintf(_T("ok\n") );
And I obtain this result:
ERR: (1313) - [Privilegio specificato non esistente.
]
I believe not to mistake, but there is an error, where is it?
Please, help me!
Thank you very much.
7600.16385.0) installed on.
I am executing the following lines code:
LUID Luid;
if ( !LookupPrivilegeValue(NULL,SE_CREATE_SYMBOLIC_LINK_NAME,&Luid) )
{
DWORD err_code = GetLastError();
LPTSTR str_msg = NULL;
if ( FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, HRESULT_FROM_SETUPAPI (err_code), MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT), (LPTSTR) &str_msg, 0, NULL ) )
{
_tprintf(_T("ERR: (%u) - [%s]\n"), err_code, str_msg );
LocalFree(str_msg);
}
}
else
_tprintf(_T("ok\n") );
And I obtain this result:
ERR: (1313) - [Privilegio specificato non esistente.
]
I believe not to mistake, but there is an error, where is it?
Please, help me!
Thank you very much.