|
CFileFind is just a C++ wrapper around FindFirstFile and FindNextFile. Hence exacly the name result. That is they fail to find any files.
If I do a DIR on the directory it can not find the directory, yet Internet Explorer can. There must be another layer of protocol sitiing in the way.
|
|
|
|
|
Anorexic Tribble wrote: That is they fail to find any files.
If FindFirstFile() is failing, why are you not calling GetLastError() to find out why?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Error code is 0x4CF "The network location cannot be reached."
Yet I can see it with Internet Explorer.
|
|
|
|
|
So what does your code look like that is producing this error?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
#define INTRANET_STORE "//server5.asd.co.uk/data/docs"
BOOL Found;
CFileFind Finder;
Found = Finder.FindFile((CString)INTRANET_STORE + (CString)"/*.pdf");
while (Found)
{
Found = Finder.FindNextFile();
m_File_List.AddString(Finder.GetFileName());
}; // ENDWHILE
|
|
|
|
|
So have you tried using a Windows style UNC? The Unix style *should* work, but you never know...
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes I have tried that. Incidently if I run the code on a PC that is not connected to the Intranet I get a different error code (0x35 The network path was not found). On the Intranet machine I get 0x4CF "The network location can not be reached".
|
|
|
|
|
Appently W2K needs to have the TCP/IP NetBIOS Helper Service enabled and running. Now my error code 0x4CF is being replaced by 0x33 "Windows can not find the network path".
|
|
|
|
|
How do I export function's from a .cpp program to a dll file using __declspec(dllexport)?
And, how do I use that function in the main program.
Please let me know this...
THanks
|
|
|
|
|
|
pl_kode wrote: How do I export function's from a .cpp program to a dll...
I think what you are wanting to know is how to export from a DLL. Correct?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Export to Dll or From dll?
|
|
|
|
|
|
Overriding PreTranslateMessage() is one way to do it (I have assumed a few things, since you did not provide enough information). But, what you are in need of, may be different. Why do you want to trap the Esc Key?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I think that you want to avoid closing the dialog when the user hits the escape key.
BOOL MyDlgClass::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN)
{
if(pMsg->wParam==VK_RETURN || pMsg->wParam==VK_ESCAPE)
pMsg->wParam=NULL ;
}
return CDialog::PreTranslateMessage(pMsg);
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Are you wanting to keep from dismissing the dialog, or are you wanting to trap the ESC key for something else?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
When I am adding a function, that needs to be exported to dll, in the header section... I get the following. Please tell me how to resolve this.
error C2146: syntax error : missing ';' before identifier 'Set_file_path'
fatal error C1004: unexpected end of file found
Following is what I am adding..
string Set_file_path( string &Right_str);
I have also included "#include <string>" before this
THanks...
|
|
|
|
|
what about adding this :
using std namespace;
after
#include <string>
or use the std:: before all string members and types ?
|
|
|
|
|
That Doesnt workout. I tried doing that too.
|
|
|
|
|
I suspect what you're looking for is :-
#include <string>
using namespace std;
string Set_file_path( string& Right_str );
If not then you'll probably need to post the whole header of your file.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
No that doesnt work eithr. Wat about posting the whole header. How I do that
|
|
|
|
|
Just paste it into your message between <pre> and </pre> tags, just the text up to the point where the compiler throws a wobbly.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Hi,
I am using VC++ 6.0. in Windows 2000
Is the following code related to Environment of the system?
hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE);
_ASSERTE(SUCCEEDED(hRes));
I am getting the following error in most of the system.. but working fine with some other system which is having same configureation.... (VC++ 6.0 in Windows 2000)
Debug Assertion Failed!
Expression: SUCCEEDED(hRes)
Do I need to update Registry file or anything??
Plz Help !!
Thx,
wilfred.
|
|
|
|
|
You need to determine the value of hRes to find out which error occured when you called _Module.RegisterClassObjects . You might need greater administratve privelleges to register your server or there could be one of a number of other errors.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
I have Admin privilege...
Let me find out wat is the value in hRes..
Thx...
|
|
|
|