|
Thats what I was going to suggest.
How do I print my voice mail?
|
|
|
|
|
Thirded!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Random numbers have been the most popular subject for grad students to study in computer science since before comptuer science was a program at universities! There is good reason for this, and it goes well byond what anyone would write in a simple post.
Start reading, until you understand what question to ask you should not ask the question. Once you know what questions to ask you are well on your way to finding a solution.
Donald Knuth's "Art of Comptuer Programing" is a good start (but a little expensive, and not a simple read). There are plenty of web resources.
|
|
|
|
|
Our program has a requirement to copy files from one computer to another.
The remote computer is mapped to a particular drive on the local computer.
The network is wide open and all users have full control.
We use the MSDN CopyFile function to perform the copy operation.
This works when installing on Windows 2000.
The problem occurs when installing the program on Windows Server 2003
Platform. The error returned by the CopyFile function is "path not found."
The access/stat functions return the same error.
Is there another MSDN funciton to use, or what environment setting does
Win 2003 need?
|
|
|
|
|
MSDN is documentation for several APIs. It is not an API itself.
Have you tried SHFileOperation() with the FO_COPY operation?
Does copying those file outside of your application work?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Copying files via explorer works. I did try the SHFileOperation() and had success with it. Thanks.
|
|
|
|
|
Please provide an example of the paths you are trying to copy from and to.
Environment settings will likely not have an effect unless you are using an environment variable, like %WINDIR% .
Peace!
-=- James
Tip for inexperienced drivers: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
Found that using SHFileOperation() works nicely.
But an example would be:
LogonUser(); // using username, domain, pwd
ImpersonateLoggedOnUser(); // using logon handle
strcpy(src, "C:\usr\myFile.txt");
// Y is a mapped drive to remote location
strcpy(dest, "Y:\usr\remoteFile.txt");
CopyFile(src, dest, 0);
|
|
|
|
|
The backslashes in the string literals need to be doubled.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello all,
I'm trying to include files to a project on a Windows 2000 system which are located on my Unix account. However, MS VS6 changes the directory names by default to capital letters, and hence Visual C++ cannot find them back anymore, as capital or normal letters are important to UNIX systems. Is there a way to avoid this change to capital letters? I didn't find how to in the Options menu.
I tested if there were access problems, but no, if I create a file and directory with capital letters on my Unix account, I can edit the file. But I would like to avoid this in this project.
Any help would be great, and a huge step forward,
Thanks,
Bart.
|
|
|
|
|
I'm writing a prog that works in the background all the time. So it is loaded on windows startup and unloaded on shutdown. The question is: do I have to perform all the clean up like freeing dynamically allocated memory or uninstalling the hook when windows is being restarted or shut down. If yes then what what message is sent to my application to inform that windows is going to finish it's work? I do not get WM_DESTROY or WM_CLOSE like in the case when I terminate the program myself. Thanks.
|
|
|
|
|
Idealy Yes
WM_ENDSESSION
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi there,
I used Brian Hart's code (Article:Center CMDIChildWnds and Other Tips) to center my windows. No errors were detected in Debug mode and everything worked just fine. But when I switched my active configuration to release mode, it gives me the following error:
error C2065: 'WM_SIZEPARENT' : undeclared identifier
Why is that when this is a MFC message?
Thanks!
|
|
|
|
|
elephantstar wrote:
error C2065: 'WM_SIZEPARENT' : undeclared identifier
Why is that when this is a MFC message?
Probably because afxpriv.h has not been included.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It is included in stdafx.h. I still don't understand why it's giving me the error.
|
|
|
|
|
Size you indicate that it compiles in debug mode but not in release mode, I would suggest looking at the project's .dsp file and noting the differences between the two configurations.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The application now works but some of the data is wrong in Release mode but everthing works fine in Debug. How do I compare the two and see where it went wrong? Thanks!
|
|
|
|
|
elephantstar wrote:
The application now works...
What did you change to correct the behavior?
elephantstar wrote:
How do I compare the two and see where it went wrong?
The two what? Are you talking about the project's .dsp file?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Instead of including <afxpriv.h> within stdafx.h, I included it directly with the class. Previously, my class included stdafx.h which in turn included <afxpriv.h> and it worked just fine.
As for my changes that causes two different outputs in Debug and Release mode, I didn't think to check in Release mode each time I updated my application. I have been using debug mode up until I needed to release it. Only then did I find out too late that it did not produce the correct output.
Is there an easy way to compare the two configurations and see where the problem lies?
Thanks!
|
|
|
|
|
elephantstar wrote:
Is there an easy way to compare the two configurations and see where the problem lies?
Yes. Look at the project's .dsp file. Haven't I mentioned that before?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes you did but I wasn't sure what I was looking at. Am I looking for differences in the two configuration settings? Thanks!
|
|
|
|
|
elephantstar wrote:
Yes you did but I wasn't sure what I was looking at.
The release-specific settings will follow !IF "$(CFG)" == "prjname - Win32 Release" and the debug-specific settings will follow !ELSEIF "$(CFG)" == "prjname - Win32 Debug". Look at the lines in each section and will become apparent what you are supposed to compare.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I remember seeing somewhere there was a way to use AfxBeginThread with a non-static member function. Does anyone out there know anything about this?
[insert witty comment here]
bdiamond
|
|
|
|
|
Is this of academic interest? Otherwise you could just send the this-pointer as pParam in the call, using a static member function as thread func. In that function, just convert the argument and call whatever non-static member you'd like.
|
|
|
|
|
Thanks, actually I just tried that. It works, except for some other problems I'm having.
[insert witty comment here]
bdiamond
|
|
|
|