|
Does argv[1] refer to a remote computer? Do you have the "backup file and directories" privilege?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
argv1 refers to the directory you want to monitor i.e. monitor c:\tmp
|
|
|
|
|
auriga19 wrote: argv1 refers to the directory you want to monitor i.e. monitor c:\tmp
I'm full aware of that. When FindFirstChangeNotification() fails to receive notification, does argv[1] refer to a remote computer?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
No, it refers to a directory on the local computer.
|
|
|
|
|
Ok, then the redirector is likely not the problem.
Just for grins, did you enable the "backup file and directories" privilege?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I just checked, I have those privileges enabled.
|
|
|
|
|
We can HOOKAPI. Such as "MessageboxA / W" or "OpenProcess" and so on. Then we can Hook the other?
For example,Hook "PEXCEPTION_POINTERS"?
<br />
LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)<br />
//This is our definition of the function,This is an internal function and Not exported.It isn't API HOOK it so we can not have any way to HOOK PEXCEPTION_POINTERS?
If it can, then how to write?
|
|
|
|
|
You want to hook 004381230 right?
Actually API hooking technique is for hooking APIs. I dont think PEXCEPTION_POINTERS can be hooked.
If tell ur need, may be i can help u.
Величие не Бога может быть недооценена.
|
|
|
|
|
Does "004381230" mean?
|
|
|
|
|
I have a multidoctemplate app, call it MyApp. For the default doc-view-frame of MyAppDoc-MyAppView-CChildFrame, I override the frame ActivateFrame to show the frame maximized. I added another doc-view-frame set, NewDoc-NewView-NewFrame, NewFrame derived from CMDIChildWnd. I override NewFrame ActivateFrame to show it normal. When I create and show a NewDoc object, it displays correctly but now my MapAppView is no longer maximized but cascaded with the NewView object. Why would anything I do with NewView affect anything I had done with MyAppView? I want MyAppView to continue to be maximized but NewView to be normal since I may create a lot of NewView objects and I want them cascaded when they are first shown. Thanks in advance.
|
|
|
|
|
That's the default behavior/implementation. If one child frame is maximized, so are the others when activated.
If you want one child frame maximized while the others are not, you will have to make it happen yourself. One suggestion would be to intercept the message when the user maximizes the window and then just resize it to the size needed and remove borders and other window decorations by modifying the window style. There are some things to take care of though, like when the main frame size changes, so should the 'maximized' child frame.
|
|
|
|
|
Thank you for the response. I tried that by overriding OnSize in both the child frame I want to keep maximized and the others I want to cascade. But the ones I want to cascade still come up maximized. I'll keep fiddling around with it.
|
|
|
|
|
Hello, id like to connect to a http server, preferably in a multiplatfrom working way so the code will work on linux and windows, a windows only way is fine for now aswell i guess (c/c++ only).
After the connection is established i want to check if a file exists.
Open for any function recommendations /papers etc.
Just anything.
Thanks.
modified on Wednesday, June 30, 2010 11:49 AM
|
|
|
|
|
A non-portable way might be to use URLDownloadToFile() . You might also check the socket API.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
A portable solution would be using one of the many C++ networking libraries offering a "HTTP client". Checking if a file exists is as simple as making a HTTP request and see if something else than status code 200 is returned, strictly speaking 404 means file not found.
/M
|
|
|
|
|
I'd suggest cURL http://curl.haxx.se/[^], or rather the libcurl bit of it. Works on Windows, Linux, FreeBSD, OS/X and Solaris and those are just the platforms I've used it on.
Cheers,
Ash
|
|
|
|
|
Hi sir,
I want to draw a circle.
Any link or any sample will be helpful
Thanks
Raj
|
|
|
|
|
Have a look at CDC::Ellipse [^] or Ellipse [^] (there's also an example [^]).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If you're trying to draw directly into a bitmap (or similar) then you need to look at the equations for a circle.
In the simplest form, you can find points on the circumference by using :-
x = r * cos(angle);
y = r * sin(angle);
for various values of angle.
Days spent at sea are not deducted from one's alloted span - Phoenician proverb
|
|
|
|
|
Hi!
I've to read a particular line from a file. My .txt file has 55 lines. I've to read any particular line and store the contents of eache line to a structure. The file contents are separated by commas. How to do this?
|
|
|
|
|
And what's your doubt about?
Read the file line by line (you may use CStdioFile::ReadString [^] of fgets [^]) and then parse the line for values (again, you may use CStringT::Tokenize [^] or strtok [^]).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
An alternative to CPalini's outline solution: Think about using the standard library...
- std::ifstream - read from one of these
- std::getline - use this to read from the ifstream
- std::string - read each line into one of these
- std::string::find - to parse the string
There are more parsing options out there but if you're asking about file I/O you're probably not up for writing one of those yet.
Cheers,
Ash
|
|
|
|
|
Is that a file where you are storing app specific configuration settings or so? In which case, I'd recommend create an .inf file and using GetPrivateProfileString()[^] (and its sibling functions). It would make your task much easier.
It's time for a new sig. Seriously.
|
|
|
|
|
Hi all,
I've got a nasty looking chuck of code that is just asking to be written better...
The function as it is works... It converts the two double parameters to string format (using a macro that I havent added below), and then joins them all together (along with the headers that are already in string format).
Would be great if someone could let me know a more eligant way to join the strings than the way I have done it...
<br />
static inline STRING lcd_ConstructLine(STRING pcH1, double dV1, STRING pcH2, double dV2)<br />
{<br />
char acBuff1[CONV_DOUBLE_STRING_SIZE];<br />
char acBuff2[CONV_DOUBLE_STRING_SIZE];<br />
<br />
strcpy(acBuff1, lcd_String(dV1));<br />
strcpy(acBuff2, lcd_String(dV2));<br />
<br />
strcpy(_acLine, pcH1);<br />
strcat(_acLine, acBuff1);<br />
strcat(_acLine, pcH2);<br />
strcat(_acLine, acBuff2);<br />
<br />
return(_acLine);<br />
}<br />
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|
|
You're never going to get anything that elegant all the time you're using macros, global variables and pointers. As it looks like you're using a C++ compiler why not actually use the language?
std::string lcd_construct_line( const std::string &header_1, const std::string &header_2, double value_1, double value_2 )
{
std::ostringstream str;
str << header_1 << lcd_String( value_1 ) << header_2 << lcd_String( value_2 );
return str.str;
}
I'd also get rid of the macro and, if it was used enough, implement a manipulator that does the same thing OR if it's only used once bung it in a function:
std::string lcd_construct_line( const std::string &header_1, const std::string &header_2, double value_1, double value_2 )
{
std::ostringstream str;
str << header_1 << lcd_string << value_1 << header_2 << lcd_string << value_2;
return str.str;
}
It's not going to be much slower than the low level fiddling you're doing as the compiler can inline the insertions fairly effectively.
Cheers,
Ash
|
|
|
|