|
yes not all the mousemovementz are captured!!!!!dependz o how fast the user movez it(the messages are sensed/generated in regular time intervalz).....well u can make the Static control bigger,so there is more area!!!!!and the lesser would be the chances the movemove message iz lost!!!!!
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
I am in a project of sending SMS to mobile using vc++, i need some sample code from which i get a idea to start the project.
R.Mahesh
|
|
|
|
|
Code Development For SMS highly depend Upon The Hardware used!!!.
I.E. What are you using to send SMS Connecting the Mobile to computer or some other WireLess Device or using Net based SMS !!!.
could you clarify on this matter!!!.
"I Think this Will Help"
[Vote One Here, Complete my Survey....]
<h5
alok="" gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
hi,
For sending SMS i use an external modem to connect mobile with computer.
and alos i need how send sms through Net also.
|
|
|
|
|
Do you mean through the internet?,
If you are in UK, register in the orange.net website. Free sms are available. Or search google for sms free sites, so many of them.
|
|
|
|
|
i want to send sms to a mobile phone depending on some event occurence in my main application.i read some documentation on the net and wat i found out was i need a GSM module and then feed it with some AT commands in order to send the sms. i want to know if thats the right procedure and the quicker one.also how do i actually send the AT command to the the GSM module.i am programming using VC++6.
mahesh
|
|
|
|
|
Hello, i have a problem in the communication between computers with sockets because when i connect with the server i recieve a verification that i am connected but also i want to send the file list of c:\ and i don't know how. Somebody can say me how or write me the esential lines of code.
Thanks you very much.
|
|
|
|
|
Hi densitet,
You can send a file, by converting it to the stream of data.
e.g
Machine1 - Open that file, read the content and send it.
Machine2 - Write the recieved stream/data to file, to get your original file.
I think this is the simplest way to transfer the file using socket !
Gud Luck !
Cheers,
Vishal
|
|
|
|
|
Hi vishalmore,
I don't know if i'm understanding because i'm very new with the sockets but i only want that the server send me the files that it has in c:\ but i don't want the file, only the list
Thankyou
|
|
|
|
|
HI Densitet!!
if you are successful in connecting Sockets, i.e. you can send "hello" between Server and Client then this piece of logic to send the c:\ file List between two computer.
->after connecting socket, enumerate the all the file present in the C:\ using FindFirstFile and FindNextFile or you can use this wrapper
http://www.codeproject.com/file/win32findfile.asp
Now copy all file name in a single string separated by some separator (u can use ';' for that) i.e.
if your c:\ for example contain these file 1.txt 7.exe and fatman.mpg then you string be something like this 1.txt;7.txt;fatman.mpg; send this string to server and on server end parse this string to get actual file list.
"I Think this Will Help"
[Vote One Here, Complete my Survey....]
<h5
alok="" gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Aloak,
Gud explanation, thnx nways to ease the job
Cheers,
Vishal
|
|
|
|
|
If some one of you have the idea of how to access the windows default mouse handling function, whereby the mouse responds the same (with the same context menus etc) as it does on Normal desktop. This is a part of my final year project.
Ikramullah
|
|
|
|
|
Perhaps you could use SetCursorPos() to move the mouse and post standard mouse related messages to the desktop window (CWnd::GetDesktopWindow() )?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello,
What I'm attempting to do here is access the memory of a process which i have already created for 'read' purposes. I feel that I'm close, but can't quite get it to work and its chalenging. After reading i then want all the info of the memory read to be displayed and save into a file
I need to have finished this by the end of the week, pliz assist.
Part of the code is below:
int main(int argc, char **argv)
{
PROCESS_INFORMATION pi; /* filled in by CreateProcess */
STARTUPINFO si; /* startup info for the new process*/
HANDLE hProcess = pi.hProcess;
BYTE buf[2000];
DWORD bufsize = sizeof buf;
DWORD baseaddr = 1;
DWORD error = GetLastError();
LPCVOID lpAddress;
PMEMORY_BASIC_INFORMATION lpBuffer;
DWORD dwLength;
DWORD flNewProtect;
PDWORD lpflOldProtect;
DWORD dwSize =0;
LPCVOID lpBaseAddress;
DWORD nSize;
LPDWORD lpNumberOfBytesRead;
printf("Process %d reporting for creation\n",GetCurrentProcessId());
GetStartupInfo(&si);
// Call CreateProcess, telling it to run an exe file
CreateProcess(NULL, /* lpApplicationName */
"numbers.exe", /* lpCommandLine assumes to use curent process directory*/
NULL, /* lpsaProcess */
NULL, /* lpsaThread */
FALSE, /* bInheritHandles */
CREATE_NEW_CONSOLE, /* dwCreationFlags */
NULL, /* lpEnvironment */
NULL, /* lpCurDir */
&si, /* lpStartupInfo */
&pi /* lpProcInfo */
);
printf("New Process ID: %d ",pi.dwProcessId);
printf("has started \n");
//============================================
OpenProcess(
PROCESS_ALL_ACCESS, // access flag
0, // handle inheritance flag
pi.dwProcessId // process identifier
);
//===============================================
GetModuleHandle(
"numbers.exe" // address of module name to return handle
// for
);
//============================================================
// ImageNtHeader(
// 1
// );
//============================================================
VirtualQueryEx(
hProcess, // handle to process
lpAddress, // address of region
lpBuffer,// address of information buffer
dwLength // size of buffer
);
//==========================================================
//*to avoid crashing
VirtualProtectEx(
hProcess, // handle to process
lpAddress, // address of region of committed pages
dwSize, // size of region
flNewProtect, // desired access protection
lpflOldProtect // address of variable to get old protection
);
//============================================================
ReadProcessMemory(hProcess,
lpBaseAddress,
lpBuffer,
nSize, //number of bytes to ead from process*/
lpNumberOfBytesRead //number of bytes transfered*/
);
ZeroMemory(buf, sizeof(buf));
if( ReadProcessMemory( hProcess, &baseaddr, &buf, bufsize, NULL ) == FALSE )
{
printf("\nProcess memory read failed");
_exit(1);
}
else
printf("\nProcess memory read \n");
return(0);
}
Thanx in advance
oam
|
|
|
|
|
This piece of code:
PROCESS_INFORMATION pi;
STARTUPINFO si;
HANDLE hProcess = pi.hProcess;
Seems a bit buggy , you haven't invoked CreateProcess yet, so hProcess is set to whatever is at the memory location pi.hProcess.
Why is there two calls to ReadProcessMemory ?
When you've invoked ReadProcessMemory, the second invocation , you could call GetLastError to let Windows tell you what went wrong. At the moment I guess it would say that hProcess is an invalid parameter
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
CreateProcess has been invoked, the missing part was the
BOOL EnableDebugPrivNT(); which enables access to the specified memory.The ReadProcessMemory has been removed now. About pi.process i thought the created process will be the one to readmemory of...
oam
|
|
|
|
|
mpapeo wrote:
About pi.process i thought the created process will be the one to readmemory of...
You tell me
What is wrong in the code though, is that you declare the variable pi , which is to be filled by the function CreateProcess . However, before actually filling that struct, you assign the value of one of it's members to the variable hProcess .
I don't know about the rest of the code, but you have to switch the steps here from:
PROCESS_INFORMATION pi;
HANDLE hProcess = pi.hProcess;
to
PROCESS_INFORMATION pi;
HANDLE hProcess = NULL
...
CreateProcess(NULL,
"numbers.exe",
NULL,
NULL,
FALSE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&si,
&pi
);
hProcess = pi.hProcess;
That is of course assuming that CreateProcess succeeded. There is, in my opinion, a lack of result testing. This is of course essential to production code, but also when you are in a test phase, it would help you a lot in finding the errors.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Well, you have the idea but now i found it crushing.
i get this error, " The value of the ESP was not properly saved accross a function call ...
Well how can i call the ReadProcessMemory to return the size of memory the "CreateProcess()" has occupied as that i can extract it?
oam
|
|
|
|
|
Tis a simple question and can be answered easily in QuickBasic but how can I do it in a C++ 6.0 console app? I'm taking a 1st semester C++ class and my instructor can't answer my question. The book doesn't cover it and I have looked but can't find it on the web -- not sure I know how to ask the question correctly. I'm looking for a standard C++ string function which does something like:
mystring = StringFcn(n,"ch")
where n = number of characters to be put in the string
and ch = the character to be used.
Given n = 5 and ch = x
cout << mystring << endl; would produce
xxxxx
I can brute force it, but would expect there to be a standard library function.
thanks for any help.
jj2
|
|
|
|
|
|
#include<iostream>
#include<string>
using namespace std;
int main()
{
int n=5;
char ch='x';
string str(n,ch);
cout<
|
|
|
|
|
/*
Hi Duds,
I am using IFileSystem Interface from scrrun.dll.
It is easier to use "Scripting.FileSystemObject" in Visual Basic.
However, when srcrun.dll is imported so as to used in VC++ project is gives following
compilation error.
warning C4003: not enough actual parameters for macro 'GetFreeSpace'
GetFreeSpace falls under category of Obsolete Windows Programming Elements.
These functions are supported only for backward compatibility with the 16-bit Windows API.
To get rid of this problem, you need to undefine GetFreeSpace as #undef GetFreeSpace.
Now code starts compling properly.
Real Problem with this interface is:
void CopyFolder(
[in] BSTR Source,
[in] BSTR Destination,
[in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
When folder already exists CopyFolder API throws exception, even when passing
OverWriteFiles=FALSE.
My objetive is if the destination folder already exists, then copy folder should copy files
that are not present in the destination folder.
So, How to copy file to folder which might already exists?
Thanks & regards,
Rajesh
nikam_rajesh@hotmail.com
*/
#include <atlbase.h>
#undef GetFreeSpace // For warning C4003: not enough actual parameters for macro 'GetFreeSpace'
#import "scrrun.dll"
using namespace Scripting ;
int MyCopyFolder (char *szSrcPath, char *szDstPath)
{
CoInitialize (NULL) ;
try
{
IFileSystemPtr ifSysPtr ;
ifSysPtr.CreateInstance (__uuidof (FileSystemObject)) ;
ifSysPtr->CopyFolder (szSrcPath, szDstPath, FALSE) ;
}
catch (_com_error e)
{
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
MessageBox (0, (char *)bstrSource, (char *)bstrDescription, MB_ICONINFORMATION) ;
}
catch (...)
{
MessageBox (0, "Error occured while copying file.", "Copy Folder Demo", 0) ;
}
CoUninitialize ();
return 1 ;
}
int main ()
{
int nRet = MyCopyFolder ("c:\\test", "c:\\test1") ;
return 0 ;
}
Rajesh Nikam
|
|
|
|
|
:-DQuestion one:
What is the meaning when window is actived?
What is the difference between actived and setfocus?
What operation will make a object of CWnd class responds the OnActivate message?
Questiong two:
There is a class named CBMWin which derived from CWnd.I generate its objects by dynamic, and display them in the View of a MDI application as the view's subwindows.Now, I need to chage those subwindows' style by those subwindows's state. For example, when I select a subwindow, the style of the subwindow should add a WS_SIZEBOX style and previous subwindow I selected should remove the WS_SIZEBOX style.If I hit the client area which does not occupied by those subwindows, all of those subwindows have not a WS_SIZEBOX style .In a word,the selected subwindow havs a WS_SIZEBOX style and other have not.
Which message of the CBMWin class Should I deal with?
Looking forward to your help!
andy
|
|
|
|
|
Question three:
How will you learn anything if you get someone else to do your homework?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I think if you can tell me the answer, I will learn how to resolve the similar problem.Thank you all the same,ravi.
andy
|
|
|
|
|