Click here to Skip to main content
15,861,125 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File Path error Pin
goldenrose920-Jan-11 3:20
goldenrose920-Jan-11 3:20 
GeneralRe: File Path error Pin
Richard MacCutchan20-Jan-11 4:11
mveRichard MacCutchan20-Jan-11 4:11 
GeneralRe: File Path error Pin
goldenrose920-Jan-11 19:10
goldenrose920-Jan-11 19:10 
GeneralRe: File Path error Pin
Andrew Brock20-Jan-11 19:51
Andrew Brock20-Jan-11 19:51 
GeneralRe: File Path error Pin
goldenrose921-Jan-11 18:42
goldenrose921-Jan-11 18:42 
Questionhow to draw oscilloscope graph when we import wmp3 file in vc++ Pin
rajniyadav1a19-Jan-11 23:15
rajniyadav1a19-Jan-11 23:15 
AnswerRe: how to draw oscilloscope graph when we import wmp3 file in vc++ Pin
Cedric Moonen19-Jan-11 23:23
Cedric Moonen19-Jan-11 23:23 
QuestionDavAddConnection example [modified] Pin
ShadowUz19-Jan-11 22:14
ShadowUz19-Jan-11 22:14 
Hello guys!

I have to connect to WebDAV Server, example: http://webdav.pspace.co.kr
But I cannot find any code example for DavAddConnection Function.

And, in MSDN I found this:
"Use this function when you are connecting to a WebDAV server using the Secure Sockets Layer (SSL) protocol and therefore must specify a certificate. To connect to a WebDAV server without specifying a certificate, use a Windows networking function such as WNetAddConnection2 or WNetAddConnection3."

Does anyone know some examples of DavAddConnection?

Found some code examples for WNetAddConnection2 and tried to connect, but, unsuccessfully.
CString passW=_T("pwd123");
CString userN=_T("user1");
CString locname=_T("webdav.pspace.co.kr");
DWORD dwRetVal;

NETRESOURCE nr;
DWORD dwFlags;
memset(&nr, 0, sizeof (NETRESOURCE));
	
nr.dwType = RESOURCETYPE_ANY;
nr.lpLocalName = (LPTSTR)((LPCTSTR)locname);
nr.lpRemoteName = (LPTSTR)((LPCTSTR)locname);
nr.lpProvider = NULL;
dwFlags = CONNECT_UPDATE_PROFILE;
dwRetVal = WNetAddConnection2(&nr, passW, userN, FALSE);

if (dwRetVal == NO_ERROR)
    AfxMessageBox(_T("Connection added to"));
else
    AfxMessageBox(_T("Error"));


I'm getting "Error".
By the way, I'm I doing right trying to connect to WebDAV server via this technic?

Thank you.

modified on Thursday, January 20, 2011 8:30 PM

AnswerRe: DavAddConnection examle Pin
Andrew Brock19-Jan-11 22:30
Andrew Brock19-Jan-11 22:30 
GeneralRe: DavAddConnection examle Pin
ShadowUz19-Jan-11 22:37
ShadowUz19-Jan-11 22:37 
GeneralRe: DavAddConnection examle Pin
Andrew Brock19-Jan-11 22:46
Andrew Brock19-Jan-11 22:46 
AnswerRe: DavAddConnection examle Pin
Andrew Brock19-Jan-11 22:53
Andrew Brock19-Jan-11 22:53 
GeneralRe: DavAddConnection example Pin
ShadowUz20-Jan-11 18:14
ShadowUz20-Jan-11 18:14 
GeneralRe: DavAddConnection example Pin
Andrew Brock20-Jan-11 18:37
Andrew Brock20-Jan-11 18:37 
GeneralRe: DavAddConnection example Pin
ShadowUz20-Jan-11 18:50
ShadowUz20-Jan-11 18:50 
GeneralRe: DavAddConnection example Pin
Andrew Brock20-Jan-11 19:05
Andrew Brock20-Jan-11 19:05 
AnswerRe: DavAddConnection example Pin
micktsai21-Jan-11 0:55
micktsai21-Jan-11 0:55 
QuestionHow to use ActiveX control in win32? Pin
mathivanaan19-Jan-11 22:12
mathivanaan19-Jan-11 22:12 
AnswerRe: How to use ActiveX control in win32? Pin
_AnsHUMAN_ 19-Jan-11 22:29
_AnsHUMAN_ 19-Jan-11 22:29 
GeneralRe: How to use ActiveX control in win32? Pin
Stephen Hewitt19-Jan-11 23:14
Stephen Hewitt19-Jan-11 23:14 
AnswerRe: How to use ActiveX control in win32? Pin
Cedric Moonen19-Jan-11 22:35
Cedric Moonen19-Jan-11 22:35 
QuestionCountry Name Pin
john563219-Jan-11 21:26
john563219-Jan-11 21:26 
AnswerRe: Country Name Pin
_AnsHUMAN_ 19-Jan-11 21:36
_AnsHUMAN_ 19-Jan-11 21:36 
GeneralRe: Country Name Pin
john563219-Jan-11 21:53
john563219-Jan-11 21:53 
GeneralRe: Country Name Pin
Richard MacCutchan20-Jan-11 1:46
mveRichard MacCutchan20-Jan-11 1:46 

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.