|
I used postMessage(CUSTOM_MESSAGE,...)
my desired behaviour is that this message would get to the last spot in the message queue
but it seems that it get to the first spot
|
|
|
|
|
can anyone help me out how to create a wrapper for java in cpp ?
what i want to do is =>
1. suppose i have jar file...i have to extract it. (done)
2. find all its contents such as classes,methods using reflectin api's. (done)
3. invoke jvm. (done)
4. create a wrapper for methods ,class which are available from step 2 (in c++)(i dont know how to go about it.)
any kind of tips, sample code,source code of any already existing freeware s/w, links are most welcome... !
|
|
|
|
|
how do i load an ".sys" file in windows 98?
in windows XP, 2000, 2003 and Vista: i load it(.sys file) with calling OpenSCManager, CreateService, OpenService api functions, and i uninstall it with calling ControlService and DeleteService.
how do i load an ".sys" file in windows 98?
Zo.Naderi-Iran
|
|
|
|
|
I have a program. I want to distribute a passcode so that they
can register the software one-time. The way I currently handle this
is alot of work.
My thought process was this: to create a 100 passcodes like:
14123
45143
34533
just random numbers. I give a number to someone, they type in the
passcode and the software goes to a folder on the web, downloads
an ascii file, removes that number from the list of numbers on that
file, and then uploads that new file to the web. Since that number has
been removed, the passcode was only valid once.
I can download an ascii file from my website, but I can figure out
how to upload that new file to replace the existing file. My question
is twofold:
1. Is my strategy a good strategy for distributing passcodes? Anything
I can do to make it easier.
2. How can I upload a file to replace an existing file on the web?
Please, any response any one can give me will be greatly appreciated.
Sample projects are adored!!
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Here's how I do it. First of all, I use GUIDs for my passcode, to keep it unique and sufficiently long that it is unlikely to be guesed. Then, I get the processor Id and pass that through to a webservice, which checks if it's an Id already assigned to that passcode, or if that passcode has licenses available. Then it reports this to the client, where I store the passcode and a hashed response key in a file, so I can read that file and check it's validity for licensing in future.
The problem with your approach is that if someone reinstalls on the same machine, registration will fail.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Any chance you have a sample project or know of a sample
project that does something like this?
Please let me know.
My email address is brinasas@yahoo.com
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Hello!
Is there any way to get a notification when Windows enters the hibernate state? Is a windows message sent, or can one register a callback?
I've found the WM_POWERBROADCAST message, however it seems that you can only detect the standby modus with it, not hibernation.
Best regards
Dominik
|
|
|
|
|
The PBT_APMSUSPEND event (in a WM_POWERBROADCAST message) doesn't indicate
the system is entering hibernate state?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It seems Windows does not send PBT_APMSUSPEND nor PBT_APMQUERYSUSPEND (in WM_POWERBROADCAST ) when going to sleep. I've found some other power functions in the meanwhile (CallNtPowerInformation , GetActivePwrScheme , ...), maybe one of these helps...
Thanks anyway for your reply, best regards
Dominik
|
|
|
|
|
Hi all
My computer had installed a video-capture-card at recent(PCI slot).
I use VC8,
What software development kit can do it best?
DirectX show or platform SDK or other?
thanks!
|
|
|
|
|
DirectShow[^], which is now in the platform SDK, can do
it well.
For Vista+ only development, there's the
Microsoft Media Foundation SDK[^].
For legacy stuff, there's still Video For Windows[^]
but it's getting a little dated and doesn't provide much functionality
compared to the other two above.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hello everyone,
I am learning code from others, but I do not know why the following code section can compile?
Why assignment p = new (void (*[3])()) is ok? Are the left side and right side of assignment having compatible type?
[Code]
void (**p)();
int main()
{
p = new (void (*[3])());
return 0;
}
[/Code]
thanks in advance,
George
|
|
|
|
|
Arrays names are synonim of const pointer (to the same type) hence the magic.
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.
[my articles]
|
|
|
|
|
Thanks CPallini!
Why "Arrays names are synonim of const pointer" could apply to my question? Could you provide more information please?
regards,
George
|
|
|
|
|
George_George wrote: void (**p)();
int main()
{
p = new (void (*[3])());
return 0;
}
void (**p)();
declares a pointer to a pointer to a function accepting no arguments and returning no arguments.
new (void (*[3])());
allocates memory for an array of pointers to functions accepting no argument and returning no value.
p can be initialised with the address of the first element of the array, i.e. with the (implicit) array name.
For instance, try the following:
void fun1() { printf("Hi");}
void fun2() { printf(" George");}
void (**p)();
int main()
{
p = new (void (*[3])());
p[0] = fun1;
p[1] = fun2;
p[2] = fun2;
p[0]();
p[1]();
p[2]();
}
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.
[my articles]
|
|
|
|
|
Thanks CPallini,
Your sample is great! My question is answered.
regards,
George
|
|
|
|
|
Hello everyone,
I am learning structured exception from,
http://msdn2.microsoft.com/en-us/library/ms681409(VS.85).aspx
I read a couple of links from MSDN, but still confused what is structured exception, what is the differences between structure exception and our normal C++ exception, like bad_alloc and various user define exception?
thanks in advance,
George
|
|
|
|
|
|
Thanks Hamid,
Looks comprehensive! I just briefly read through the article and it seems structured exception is totally different from normal C++ exception. Looks like another approach to produce/handle exceptions, but I have never used and met any API in MSDN documented structured exception before.
Do you have any experience where should we use structured exception?
regards,
George
|
|
|
|
|
if i select Cancel button, or select the Close option from the dialog box's other controls of my application are not working there is sum error how can i remove this error.
thanks and regards
|
|
|
|
|
v.j wrote: there is sum error
Maybe posting the error and the affected code will help.
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.
[my articles]
|
|
|
|
|
If you click on cancel, won't the app close? Care to explain your problem?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
v.j wrote: ...my application are not working there is sum error...
Would that be error A or error B?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
v.j wrote: my application are not working there is sum error
That is very poor description of your error. Without knowing what it is, no one can really help.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|