|
toxcct wrote: Complete Idiot Guide
Owner drawn
Jesus Loves
|
|
|
|
|
|
toxcct wrote: i didn't name it myself
Thinking about the guys who read it.
toxcct wrote: ps: nice to see you back dear... where were you for all these days ?
Thanks. My ghost was always present here.
Owner drawn
Jesus Loves
|
|
|
|
|
|
Is it really interesting to code with .net framework + C++.
I could not enter into the new world something resisting me to do that
what is ur opinion about new C++ versions and coding with .net?
SaRath
|
|
|
|
|
you'd better ask this in the C++/CLI forum or even in the lounge...
personnaly, i'm not interrested at all in coding for the .NET framework for the moment, in whatever language i could use...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: personnaly, i'm not interrested at all in coding for the .NET framework for the moment, in whatever language i could use...
Thanks for ur reply
SaRath
"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"
|
|
|
|
|
toxcct wrote: you'd better ask this in the C++/CLI forum or even in the lounge...
if i post this question in C++/ CLI they will kick me off from there
why should we take a risk? there are many supporters for that but here we can get mixed opinions that's y I posted here
SaRath
"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"
|
|
|
|
|
SaRath C wrote: if i post this question in C++/ CLI they will kick me off from there
only stupid guys will...
SaRath C wrote: why should we take a risk?
because i think most people on this forum don't know managed C++ ,and even if they do, it's not the topic of this board to talk about that kind of things.
and as i think this is not a programming question but more a general knowledge question, it worth it asking the lounge
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Hi,
Before closing my application I write down the status of current working in some file.
But when the application gets closed after sudden electricity failure, how can I write down the status in a file at that time.
any Idea? / link
Regards.
|
|
|
|
|
zahid_ash wrote: But when the application gets closed after sudden electricity failure,
AFAIK there are none. WM_QUERYENDSESSION and others do help only if you are using Shut Down.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
How can you write when the system has shut down?? and Btw is this you really ask?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Mean to say that I want to write in a file( open a file and write status data in it)just before Operating system is shutting down with electricity failure
Regards.
|
|
|
|
|
I don't know how to detect electricity failure . But you can write the system status after some time span continuesly. When system shuts down you have nearest system status in ur file.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
As Nimbu has said, QueryEndSession is the only way .. that too when the system is not being shut down abruptly. But if you still want to do, do one thing, write the staus in a remote computer.(i.e a Client machine), which gets data(status) from the server(the electrically-downed machine), now atleast you can write, *when* the system actually went down.
like...
<br />
09:40:43-29/6/05 - Status X<br />
09:41:23-29/6/05 - Status Y<br />
(Now the server is down abrubtly)<br />
09:42:23-29/6/05 - Server Down, [Here the client will still be alive to say that he's down]<br />
will this work for you?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
If you have a UPS (Uniterruptible Power Supply) they send a message to the PC whe nthe mains goes off so you have time to shot down properly while the batteries in the UPS last.
Elaine
The tigress is here
|
|
|
|
|
Excellent Elaine, I didn't think of this idea. This would be the best option for him. But he must ensure that his UPS is enabled with communication port. Here in India, I find only APC providing that feature. That too not for the lower ends. I checked a model on the internet that had USB port, and I bought it home immediately. When I unpacked it, I found no *holes* around I got disappointed. I called the customer care, they said, it's available only with the Japanese model .
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
|
If we can detect the electricity failure, then we do not need of a UPS
it is only requires if we need continue our work to power failure time
SaRath
|
|
|
|
|
We cannot. Because at the time that we are able to notice a power failure, it has already happened. And as soon as the hard-disk looses power, it shuts itself down.
Yes, theoretically, the failure is not "sudden", but happens over a (very short) time-span.
If you wanted to monitor for electrical failure, your computer could not do anything else, because he would have to check Vcore every 1000 cycles or so. And even that probably would not be fast enough to trigger a HDD-Write before the disk spins down.
This ONLY works with an UPS, which will notify Windows that "you are on battery now. save everything you can.". All UPSes allow some kind of status monitoring, but you might have to install propietary drivers for older or more sophisticated models.
What I was going to say originally:
"You should really try to claim damages toward your local power company for not notifying you (in written form) two days in advance of any unplanned power failure."
But I thought that was too harsh.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Hello friends,can anyone give me the full fledged code for adding the .chm file as help file for the application.I am able to open the .chm file from the application .
Basiaclly i want to use the widget control with the indexed help file with the application. I wish friends pay heed to it and send me the code to do it with explanation
hi,Its Prashant here
Discuss with me Problems related to projects coded with C,C++,VC++,JAVA,MFC,ATL,COM & DCOM,ASP.net and system programming and Network Programming etc and also logic formulation as well as algorithms etc.
|
|
|
|
|
wrote: can anyone give me the full fledged code for adding the .chm file as help file for the application
what a surprise....?
see here[^]
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Please find the attached snippet of the code. In the following code I am trying to call a function written in VB using function pointer in VC++ dll. This code works fine if I use the function pointer in main thread. If I try to call the function in child thread then "Unhandled exeption occurs" Can anyone help me out......
Snippet from Win32 dll
// TempDLL.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "MALLOC.H"
#include "STDLIB.H"
long extNumberProc;
HANDLE hThread;
DWORD dwThreadId;
struct strctValue
{
DWORD dw;
};
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
void WINAPI CallVBFunctionForNumber (char* lSomeValueToSend, DWORD s4)
{
typedef long (__stdcall *OutsideFunction)(char*); //Defining the prototype of the function.
OutsideFunction FunctionCall; //Creating an instance that will be used to call the function.
FunctionCall = (OutsideFunction)s4; //Assigning the address to be used for the call.
long da = FunctionCall("Lalit Kumar"); //Calling the function with the parameter.
}
DWORD WINAPI StartScanning(LPVOID lParam)
{
strctValue* s2;
s2 = (strctValue*)lParam;
CallVBFunctionForNumber("Lalit Kumar", s2->dw);
return 1;
}
void WINAPI getpointer(long x)
{
strctValue s1;
s1.dw = x;
BYTE* bptr = (BYTE*)malloc(sizeof(s1));
memcpy(bptr, &s1, sizeof(s1));
hThread = CreateThread(
NULL, // default security attributes
0, // use default stack size
StartScanning, // thread function
bptr, // argument to thread function
0, // use default creation flags
&dwThreadId); // returns the thread identifier
}
The Snippet from VB code is as follows:
Public Sub Callbackfuntion(ByVal str1 As String)
MsgBox "Callbackfuntion"
End Sub
Thanks in advance.............
Arun
|
|
|
|
|
Arun Tayal wrote: BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
is the ProcessAttach call is missing???????
SaRath
|
|
|
|
|
The code mentioned above is the whole code.....
Can u please guide me what is this ProcessAttach call. and how to use it..
Thanks in Advance.
Arun
|
|
|
|