|
I think this[^] would help you.
|
|
|
|
|
thanks, malli
i have 3 radio buttons and one common button now, for 3 radio buttons, one is change background color, one is play music, last one is browse photoes, so when i check anyone radio button, and my that common button will show correspoding content what the radio button contains. thanks a lot.i searched online, but my pc and connection are slow, counldn't find. thanks.
|
|
|
|
|
Check this[^] one too.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi..
I'm supposed to get the information(when a event is trigered) from a application(service)running in a windows machine.. can some one please temme how to fetch it..
thanks in advance!!!
|
|
|
|
|
What exactly do you mean by "get the information" ? You looking for any "Data" communication between the processes or just an event notification ?
|
|
|
|
|
Thnks for the reply..
i ll tell u the exact scenario..
i have an application(i.e. an access control system).. im asked to use tcp/ip to collect the data(i.e.. address of the card reader, time and violation code) from the application when there is access violation... and after getting the instance of access violation, im supposed to pass the information to another application(written in c++) to take an action(record the event from a cctv where it is happening)..
|
|
|
|
|
I'm again confused ! Anyway, if you wanna to pass data across the process [i'm supposed to pass the information to another application(written in c++)] you can choose any of the Inter Process Communication mechanism[^]. And if you just wanna to sent an event notification (like a signaling kind of thing) you can use synchronization [^] object like Event.
|
|
|
|
|
What do you need exactly? user name? computer name? hardware profile? processes? folders? hardware?....
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thankq Hamid!!!
i have an application(i.e. an access control system).. im asked to use tcp/ip socket communication to interface. have to collect the information(device address where access violation takes place ,alarm id) from the application when there is access violation... and after getting the instance of access violation, im supposed to pass the information to another application(written in c++) to take an action(record the event from a cctv where it is happening)..
|
|
|
|
|
is there any written way to communicate or you have to create mechanism for this. could you please clear it
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
For the receiving side there is a code , which accepts the information.. i have to simply pass the value from the access control system service to the to the code...
can i use client side programming to get the info from service ?
|
|
|
|
|
it there is any documented way to retrieve code from service or you have to device your own for it...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
yea there is a documented way.. if i give a command like this to the service"" <username password="******/>" i.e.="" mode="hold">
when a event occurs, then it ll send a command in the above said format.. i have to send the data from those command to another application .
i used client socket programming to send n receive the message., is there any way to get the data
wsprintf(Buffer, ""<username password="******/">", loopcount++);
iretval = send(c_socket, zBuffer, sizeof(zBuffer), 0);
if (retval == SOCKET_ERROR)
{
fprintf(stderr," send() failed: error %d.\n", WSAGetLastError());
WSACleanup();
return -1;
}
else
printf("send() is OK.\n");
printf(" Sent data \"%s\"\n", zBuffer);
modified on Tuesday, December 30, 2008 7:25 AM
|
|
|
|
|
Hi I have an application which protects and unprotects .doc file. If I protect file first it works fine but when I am unprotecting it with following code it unprotects properly but again if I am trying to protect it it gives error (File not in format i.e not structure storage file). Please let me know is anything wrong with following code.
COleVariant vFilename(csFile);
VARIANT vOptional;
vOptional.vt = VT_ERROR;
vOptional.scode = DISP_E_PARAMNOTFOUND;
int iStat = FILE_NOT_EXIST ;
// Now ole object specific processing
switch (iType)
{
case WINWORD:
{
pFile -> Dispatch -> AddRef();
_Document Doc;
Doc.AttachDispatch(pFile -> Dispatch);
// The actual save
Doc.SaveAs( vFilename,
&vOptional, // Format
&Optional, // LockComments
&Optional, // Password
&vOptional, // AddToRecentFiles
&vOptional, // WritePassword
&vOptional, // ReadOnlyRecommended
&vOptional, // EmbedTrueTypeFonts
&vOptional, // SaveNativePictureFormat
&vOptional, // SaveFormsData
&vOptional); // SaveAsAOCELetter
}
break;
}
Do I need to add / set some more variant variable in order to protect it in second time.
Thanks
SNI
SNI
|
|
|
|
|
<br />
...<br />
&vOptional,
&Optional,
&Optional,
&vOptional,
...<br />
Do you have two different variables vOptional and Optional?
|
|
|
|
|
no that is copy paste mistake. it it vOptional at each place.
SNI
|
|
|
|
|
|
I write a simple dll and inject to another process, i communicate with the target process by sending message via a named pipe. But now, the problem is that, although i can retrieve a top-level window of the target process,i will get no response if i send menu messages to it(the hwnd i retrieved, using EnumWindows, no matter i send the messages in the callback functions of EnumWindows or not, the results are the same). So, i think, the hwnd handle i retrieved was not the target hwnd handle witch was responsible to such activity.
But, how could i get the right hwnd to handle these menu messages?
Thanks
|
|
|
|
|
i will get no response if i send menu messages to it(the hwnd i retrieved, using EnumWindows, no matter i send the messages in the callback functions of EnumWindows or not, the results are the same)
Can you please post some code lines (sending menu messages) ?
|
|
|
|
|
I wrote enumwindows callback function like following:
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
DWORD procId;
GetWindowThreadProcessId(hwnd,&procId);
log_message("Main window search callback function is called.");
if(procId==(DWORD)lParam){
....the message would to be send here
return FALSE;
}
return TRUE;
}
I send the menu message in two ways:
1. HMENU trayMenu = GetMenu(hwnd);
if(trayMenu!=NULL){//usually equal to NULL, and according to the failure in method 2(send msg no response) i think i got the wrong hwnd handle
HMENU subMenu = GetSubMenu(trayMenu,0);
if(subMenu!=NULL){
DWORD menuItemId=GetMenuItemID(subMenu,0);
if(menuItemId!=-1)
SendMessage(hwnd,WM_COMMAND,menuItemId,0);
}
}
2.Because i can get the menu resource id, and, this code is implemented in a injected dll to the target process, so, there is a second method here:
HMENU trayMenu = LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDM_MENU));
if(trayMenu!=NULL){//successfully always
...the other code looks the same with the method 1, but the target process's specified routine will not be actived, because its no response.
|
|
|
|
|
Try to find out whether you are retrieving ID of the right menu item. Call GetMenuString() for that item and debug print it. If you send the message for menu item which consists of submenu, that won't help you (application doesn't display out the submenu as a result).
|
|
|
|
|
im sorry to reply so latter. i have gone to another city. and i know them problem now, i got the right menu, menuitems and menuIDs, but sent the menu message to a wrong hwnd. The program has more than one toplevel hwnd, so, i retieve all its top level hwnds and send menu message it them. then, when i got the right hwnd, the message would send successfully.
|
|
|
|
|
Hi All,
I am using the Windows API to enumerate the certificate installed in the 'MY' store. In this process, i am able to enumerate the certificates installed in the smart card also. I am looking for an API which would differentiate whether the certificate is within the samrt card container or in the machine itself.
Your time and help will be appreciated. Thanks in advance.
Sunil
|
|
|
|
|
Hello Frriends
"MSVCRT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'"
This Linker error really frustrates me and i googling a lot but didnt find any relevant suggestion.Can Anybody suggests me here , how to overcome this error....
i am Trying to compile my project (that works fine for 32 bit) to make it compatible for 64-bit OS. For That I change the Setting as "Build -> Configuration Manager -> x64|Debug". I am using MS Vs2005(VC++)
...Sorry friends if ii make any silly mistake..
is there any other way to make a project 64 bit compatible.....
|
|
|
|
|
Do you have #include<iostream.h> in your code ? If yes, try #include<iostream> instead.
|
|
|
|