Click here to Skip to main content
15,919,931 members
Home / Discussions / System Admin
   

System Admin

 
GeneralRe: Uniquely ID a machine? Pin
Peter Weyzen29-Jan-02 11:27
Peter Weyzen29-Jan-02 11:27 
GeneralCD Icon problems... Pin
Romeozulu5-Dec-01 10:08
Romeozulu5-Dec-01 10:08 
GeneralReset APIs in Win CE Pin
Laksh4-Dec-01 21:10
Laksh4-Dec-01 21:10 
QuestionHow to remove "attributes" from contextmenu? Pin
yanglei4-Dec-01 15:53
yanglei4-Dec-01 15:53 
GeneralWeird problem Pin
Jon Sagara4-Dec-01 14:04
Jon Sagara4-Dec-01 14:04 
GeneralRe: Weird problem Pin
Michael Dunn4-Dec-01 15:24
sitebuilderMichael Dunn4-Dec-01 15:24 
GeneralRe: Weird problem Pin
Jon Sagara4-Dec-01 15:44
Jon Sagara4-Dec-01 15:44 
GeneralNetShareGetInfo - returns ERROR_ACCESS_DENIED Pin
30-Nov-01 12:32
suss30-Nov-01 12:32 
I am using this API to retrieve the Network Share Information on another machine. Both the machines have been logged on as "Administrator"..

But the return status of this API is always "ERROR_ACCESS_DENIED".

Does anybody know why?

The syntax of my call is as follows:
char szPath[255];
WCHAR wcHostName[255];
WCHAR wcShareName[255];
if ( strHost.CompareNoCase(strHostName) == 0 )
MultiByteToWideChar( CP_ACP, 0, strHostName, -1, wcHostName,255 );
else
MultiByteToWideChar( CP_ACP, 0, strIP, -1, wcHostName,255 );

MultiByteToWideChar( CP_ACP, 0, strShareName, -1, wcShareName,255 );
PSHARE_INFO_502 BufPtr;
NET_API_STATUS res;

if ( (res = NetShareGetInfo( (char*)wcHostName, (char*)wcShareName, 502, (LPBYTE *)&BufPtr )) == ERROR_SUCCESS )
{ WideCharToMultiByte( CP_ACP, 0, (const unsigned short*)BufPtr->shi502_path, -1, szPath, 255, NULL, NULL ); m_strFileName = szPath; int nLen = m_strFileName.GetLength(); if ( m_strFileName.GetAt(nLen-1) != '\\' ) m_strFileName += '\\'; m_strFileName += strUNCFile; NetApiBufferFree(BufPtr);
}
else
{ strErrors += "Unable to convert UNC Name to Local name \n"; bOk = false;
}


Ramesh S


GeneralRe: NetShareGetInfo - returns ERROR_ACCESS_DENIED Pin
3-Dec-01 17:38
suss3-Dec-01 17:38 
GeneralGetSecurityInfo on Samba Pin
Rassman26-Nov-01 4:54
Rassman26-Nov-01 4:54 
GeneralMake use of 2GB of RAM + some virtual mem Pin
John M. Drescher21-Nov-01 6:59
John M. Drescher21-Nov-01 6:59 
GeneralRe: Make use of 2GB of RAM + some virtual mem Pin
Rassman26-Nov-01 5:08
Rassman26-Nov-01 5:08 
QuestionRunning .EXEs in IE in Win2k? Pin
Jason Hihn20-Nov-01 3:56
Jason Hihn20-Nov-01 3:56 
AnswerRe: Running .EXEs in IE in Win2k? Pin
moliate2-Dec-01 16:58
moliate2-Dec-01 16:58 
AnswerRe: Running .EXEs in IE in Win2k? Pin
Michael Dunn2-Dec-01 19:12
sitebuilderMichael Dunn2-Dec-01 19:12 
Generalpartition hard disk Pin
18-Nov-01 22:54
suss18-Nov-01 22:54 
GeneralRe: partition hard disk Pin
Jason Hihn20-Nov-01 4:07
Jason Hihn20-Nov-01 4:07 
GeneralCombobox Limitation under Windows 98 Pin
Ernest Laurentin16-Nov-01 5:42
Ernest Laurentin16-Nov-01 5:42 
GeneralRe: Combobox Limitation under Windows 98 Pin
moliate16-Nov-01 15:09
moliate16-Nov-01 15:09 
GeneralRe: Combobox Limitation under Windows 98 Pin
moliate16-Nov-01 15:28
moliate16-Nov-01 15:28 
Questionmailq in Windows 2000? Pin
Nish Nishant4-Nov-01 7:38
sitebuilderNish Nishant4-Nov-01 7:38 
AnswerRe: mailq in Windows 2000? Pin
Jon Sagara4-Nov-01 8:53
Jon Sagara4-Nov-01 8:53 
GeneralRe: mailq in Windows 2000? Pin
Nish Nishant4-Nov-01 9:12
sitebuilderNish Nishant4-Nov-01 9:12 
GeneralWindows 2000 Ras Error 937 connection refused when trying to connect two PCs simultaneously Pin
John M. Drescher1-Nov-01 12:58
John M. Drescher1-Nov-01 12:58 
GeneralRe: Windows 2000 Ras Error 937 connection refused when trying to connect two PCs simultaneously Pin
John M. Drescher1-Nov-01 17:21
John M. Drescher1-Nov-01 17:21 

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.