|
the path exists according to PathFileExists but not according to stat which returns an errno of ENOENT.
|
|
|
|
|
Maximilien wrote: the path exists according to PathFileExists but not according to stat which returns an errno of ENOENT.
This will happen if the path has a trailing backslash. Just out of curiosity, why are you using such an antiquated function as stat() , especially when newer alternatives exist?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
because I thought it would also give me information about the permisions ( read/write ) in the folder with the st_mode of the stat structure.
|
|
|
|
|
Maximilien wrote: because I thought it would also give me information about the permisions ( read/write )...
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks David.
|
|
|
|
|
hi all
how to copy file from source to destination in vc++?
pls give me reply.
Thanks & Regards
rakesh baldha
|
|
|
|
|
Hi,
BOOL CopyFile( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, BOOL bFailIfExists );
or
int SHFileOperation( LPSHFILEOPSTRUCT lpFileOp );
-----------
Mila
|
|
|
|
|
Have you tried CopyFile() or SHFileOperation() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi,
I want to get country code of Wireless LAN adapter.
for this i am using deviceIOControl as follows.
NDIS_OID ndisOid
//Atheros Specific OID
ndisOid = OID_ATH_REGULATORY_DOMAIN;
DeviceIoControl(theApp.m_hDevHandle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
(LPVOID)&ndisOid,
sizeof(ndisOid) + sizeof (ULONG) -1,
(LPVOID)&dwCountryCode,
sizeof(dwCountryCode),
&ulLen,
NULL);
this is working for WindowsXp, but not for Windows Vista.
can any body help me in this?????
to resolve this problem i got the information from MSDN site that it need to use WMI through the class "MSNdis_80211_WEPStatus".
i have seen it through WMI browser. but not getting any relevent information
pavan
|
|
|
|
|
Hello,
I am working with MFC dll and I would like have only one instance for a class into my dll.
now I have into my class a static funtion to GetObject():
static GlobalParameter* GetObject()
{
static GlobalParameter oneinstance;
return &oneinstance;
}
A other class that also in a other dll in this class and I have show I get different pointer from main app and this class.
Thank you to help me!
AutreChien
|
|
|
|
|
NorGUI wrote: A other class that also in a other dll in this class and I have show I get different pointer from main app and this class.
Uuh ? Sorry but I did not understand what you are trying to say. You need to explain that part a little bit clearer. What are you doing exactly with this class ?
|
|
|
|
|
Are you wanting only one instance of the DLL, or one instance of a class within the DLL?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I need one instance of a class within the DLL !
Thank
AutreChien
|
|
|
|
|
I believe these are called singleton classess. Be sure the constructor is private .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes and that's basically what he did. But I don't understand what is his problem...
|
|
|
|
|
Yes I now but my class work in my project very good I get only one instance but now I have put my "singleton" class into a DLL and the instance that I get from main app is not the same that instance that I get from a class into a other DLL.
That is my problem !
AutreChien
|
|
|
|
|
Each user app of the dll will get its own data memory so oneinstance will be different for each app.
You need to look at using shared memory in the dll so that all apps share some or all of the dll's data. It may be a much more difficult issue than it seems because of synchronising access and so on.
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Thank,
I understand now but how can I do that or do you have any sample to show me the way that I have to go..
AutreChien
|
|
|
|
|
|
Thank for the link !
AutreChien
|
|
|
|
|
How to retrive the path of current running application.Is there any function to get the path.
Thanks.
|
|
|
|
|
|
I have run the application in ATLCOM and i have given the debug path as C:\windows\explorer.exe.When i use the above i will get the path of the executable file.But my application is running in another drive.How to get the path of the application.
Thanks.
|
|
|
|
|
Hi,
Did you try to put HANDLE GetCurrentProcess() instead NULL in GetModuleFileName?
-----------
Mila
|
|
|
|
|
radhika28 wrote: But my application is running in another drive
Huh?
So you don't want the path of the running executable?
You want the path of another running executable?
Are you talking about GetCurrentDirectory()?
|
|
|
|