|
Yes, I know that. You can see also in my demo project that the last item in the tree structure is a shared folder.
You have to take the path of the shared folder and continue enumeration using FindFirstFile/FindNextFile (appending a "\*.*" or whatever mask you want to the path).
Enumeration of local files/folders (even if shared) is not responsibility of the WNet APIs, but you have another way.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
I have an ini file that I use to hold system settings.
I do not want the user to be able to open it and change values.
Can an ini file be encripted and still read and written using
GetPrivateProfileString and
WritePrivateProfileString
thank you.
|
|
|
|
|
You can't encrypt the entire file and still have it work with Get/WritePrivateProfileString, but you *can* encrypt the data before saving it to the INI file, and decrypt it after reading. However, if one of the encrypted strings contains a semi-colon, you may not get all your data back because that character represents the start of a comment in the file.
I would use a binary data file and encrypt/decrypt the data into/from there, or use the registry.
|
|
|
|
|
Have you ever heard about Multiple File Streams feature supported by NTFS file system?
If not, I recommended you to read technical article from on MSDN from Dino Esposito:
"A Programmer's Perspective on NTFS 2000 Part 1: Stream and Hard Link"
It can give you one idea how to easilly do it without file encryption
Martin
--->
|
|
|
|
|
How to initialize the follow parameter in "NETRESOURCE"?
( I ues the structure for the next call to "WNetOpenEnum")
LPTSTR lpLocalName
LPTSTR lpRemoteName
LPTSTR lpComment
LPTSTR lpProvider
Can you show me an example in practice?
Thanks.
Maer
|
|
|
|
|
I think you only need lpRemoteName and some flags.
You may also consider to use the shell and SHGetDataFromIDList if you have a PIDL of the net resource. You may obtain that by parsing a network path with SHGetDesktopFolder and IShellFolder::ParseDisplayName.
But it's surely easier to try with the first method
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi, my pal.
Thanks for your reply.
I have read the information about SHGetDesktopFolder, IShellFolder::ParseDisplayName, SHGetDataFromIDList in MSDN.
Can you show me a sample code using the functions you mentioned before to get the first level of "NETRESOURCE" of the "Network Neighborhood"?
Thanks again.
Best regards.
Maer
|
|
|
|
|
(the follow is from MSDN)
BOOL WINAPI EnumerateFunc(HWND hwnd,
HDC hdc,
LPNETRESOURCE lpnr);
What is the function "WINAPI" here?
Thanks.
Maer
|
|
|
|
|
WINAPI specifies the calling convention of the function. The calling convention is the set of rules followed to pass arguments to and invoke a function. Some aspects a calling convention must define are- Whether parameters are stored in registers or in the stack,
- the order in which parameters are stored in the stack (first parameter the first to be pushed or the other way round),
- whose responsibility it is to clean the stack after return,
- how the return parameter is passed from the function to the invoker.
So, different languages typically specify different calling conventions (notably, the Pascal calling convention is that the callee clean the stack before returning, whereas in C it is the caller that does the job). If a function is invoked with a different calling convention than expected, crash is almost sure to happen.
The language C (as implemented by Microsoft) allows the specification of the calling convention of a function so that you can invoke it even if it does not follow the C calling convention. Some calling conventions are:__cdecl , the C default calling convention,
__stdcall , aka PASCAL ,
__fastcall , __thiscall , etc.
WINAPI is simply a macro for __stdcall , and ensures that your program calls Windows APIs the Pascal way.
Why do Win32 APIs use the Pascal calling convention instead of __cdecl ? Remember that these functions inhabit global DLLs of the system and are invoked by different programs written in different languages, so they just had to stick to some particular convention.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks pal.
I still have a question.
In __stdcall calling convention, the callee cleans the stack, so it can not be a vararg function.
In __cdecl calling convention, the calling function cleans the stack, so it can be a vararg function.
I do not understand "the calling function cleans the stack, so it can be a vararg function" and "the callee cleans the stack, so it can not be a vararg function".
Can you explain the mechanism of stack cleaning and vararg function?
Thanks.
Maer
|
|
|
|
|
Michael Dunn already answered
|
|
|
|
|
Thanks all the same.
Best regards.
Maer
|
|
|
|
|
Hello,
Can some one suggest a Data compression algorithm and if possible a link to the algorithm. Mainly my data types are either text or bitmap. Thanks for the time.
Ganesh.M.Ramaswamy
|
|
|
|
|
www.zlib.org
zLib is pretty much the public domain standard in data compression. it's fast, well tested, does a good job (equivalent to ZIPping the data file) and, it's free!
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
What's wrong with the convertion?:
CComVariant varStrRet(ostrBuffer.str().c_str());
ostrBuffer is ostringstream. Everithing works fine but if I load more then aprox. 500Kb into ostrBuffer the the convertion result in access violetion. Enyone knows why?
Thanks a lot for any help
Peter
|
|
|
|
|
I would like to know how to create an ActiveX control from an existing Windows Control
|
|
|
|
|
Is a Standard Control? or you Own Control?
Cheers...
Carlos Antollini.
|
|
|
|
|
I want to develop a control similar to a CComboBox
|
|
|
|
|
Is a class Derived From CComboBox or CWnd?
Carlos Antollini.
|
|
|
|
|
The class is derived from CComboBox
|
|
|
|
|
Hi ,
I want to change the windows default icon of an .exe file to some of my own . The exe file I have does not any window for which I can load a resource and assign an icon. It is a simple console based application calling a few functions and it does not give out any output on the console.
Can anyone suggest me a method to do so.
Thanks
Vijay
|
|
|
|
|
I don't have my Visual Studio handy, but all you have to do is insert an icon using the resource insertion menu (maybe under Insert/Resource). You'll be asked to confirm that a .rc and a resource.h be included in your project. This should suffice.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks that did the job
Vijay
Vijay S
|
|
|
|
|
Hello!!
I am trying to send and receive some data using COMM(communications ). I have got the handle to COMM by the use of lineGetID().
I have only modified the timeout value (commtimeouts.ReadIntervalTimeout = 3000; and set the others to zero).. When I transmit the data from the client it gives error in the client saying ERROR_ALREADY_EXISTS (0x000000b7)..
Could you please advise what could be the problem...
Sandeep
|
|
|
|
|
Hi,
I am just about to start some email integration development. Trying to choose between Simple MAPI, Extended MAPI and CDO.
All i need to do is open a message to be sent, with attachments already added and the destination address to be filled in by the
user.
At the moment i am swaying towards simple MAPI. Is this still going to be supported in the long term, or is extended MAPI replacing it.
Cheers
Richard
|
|
|
|