|
I did one small VISUAL c++ project.
I got problem with VSS. My project is not asking the login screen when i tried to open the sln file in the project. How to solve this problem.
Please any one let me know,
Thank you.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Hi guys
I have been trying to make an app that takes simple user input then modifies the memory of some process acording to what the user typed using the writeprocesssomething method but the prob is that i need to modify an array for that as well. Lemme give an example:
I have made a CEdit variable and called it m_bytes(which contains the number of bytes to be written) next i made another variable and called it m_writetoprocess(contains the stuff to patch).
The dialog looks like this:
Bytes: 3
Patch with: 90908D
so now the array that i have made in the code will look like this:
array[3] = {90908D};
but u cant modify the memory that way so how do i change the user input so that it looks like this:
array[3] = {0x90, 0x90, 0x8D};
And one more thing is it possible to read binary data using readprocessmemory then display it in ASM code for ex if i used readprocessmemory like this:
ReadProcessMemory(hProcess, (VOID*)0x12A0D856, &memoryread, 4, 0};
then, lets say, that the memoryread variable contains this binary memory code: 74653298 now how do i change this code to ASM so that it looks like this: JMP 893256 ?
Please help me with this as i have been looking for an answer for ages now without success!
Thanks in advance
Cyclone
|
|
|
|
|
While getting the input, haldleWM_CHAR and store the individual key press into the i.e : array[i]; i++ .
Or read the chars one by one in the CString and store it in the array.CString::Mid(start,count) usefull for you.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Hiya fellow cpain's..
Just looking at the member list for CListCtrl but cant find anything to do hide a row using CListCtrl. I was looking for SetRowHeight or something similar. Am i missing something?
|
|
|
|
|
flippydeflippydebop wrote: but cant find anything to do hide a row using CList
Row in a list ctrl cannot be made hidden. Only way is to delete it.
nave
|
|
|
|
|
I dont try it but I think if you derived CListCtrl when you want to write items you can skip of this item
|
|
|
|
|
|
can u explain more? I dont understand what u need?
nave
|
|
|
|
|
I guess you need to check a thing,right?
|
|
|
|
|
Do you need to CListCtrl::FindItem ?
|
|
|
|
|
hi,
Given a window handle, is there any way we can know what it consists of
like child windows, Window title, menu items etc.
It would be very helpful if anyone can point to the API s or the MSDN documentaion, so that i can the use them in my win32 application.
Thanks in Advance,
Pvvr
|
|
|
|
|
Vissu89 wrote: Given a window handle, is there any way we can know what it consists of
like child windows, Window title, menu items etc.
See EnumChildWindows(...)
Also:
typedef struct {
DWORD cbSize;
RECT rcWindow;
RECT rcClient;
DWORD dwStyle;
DWORD dwExStyle;
DWORD dwWindowStatus;
UINT cxWindowBorders;
UINT cyWindowBorders;
ATOM atomWindowType;
WORD wCreatorVersion;
} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
GetWindowInfo(...)
This gives some information about a window's handle that you have.....
Do not know whether this would suit your needs or not exactly?
-- modified at 2:42 Friday 22nd September, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks you very much, i will try this.
Pvvr
|
|
|
|
|
and passing the application's HWND to GetWindowText() would retun you the window caption(title).
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Hello everyone on forum,
Is it possible to convert a cstring to a char pointer
if yes then how
basically i have a cstring and i want to use one function which takes char * parameters now i want to pass the value that is in cstring to this function how can i do that
Thanx.
|
|
|
|
|
for this purpose you can use
strcpy(char *,CString)
It will help you.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
You can use the operator LPCTSTR ( ), like this:
CString cs = "Hello";
char * cp = (LPCTSTR) cs;
Operator LPCTSTR is built in the CString class, so it's safe to use.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
hello "kakan"
I used the method u specified but its giving the following error
C:\Program Files\Microsoft Visual Studio\MyProjects\interface\interfacedialog1.cpp(245) : error C2440: 'initializing' : cannot convert from 'const char *' to 'char *'
Thanx
|
|
|
|
|
Hello.
That's right, operator LPCTSTR returns a const char * (The 'C' stands for 'const')
The reason for returning a const char * is that the contents of what the const char * points to must be unaltered.
So if you call a function that acually changes the content of the CString, then you have to use the CString methods GetBuffer() and ReleaseBuffer().
GetBuffer() returns a LPTSTR (a char *).
But if you use GetBuffer(), then you must call ReleaseBuffer()
So in your case, use GetBuffer() and ReleaseBuffer().
And check out the CString documentation at MSDN.
I.e here[^]
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
namy1 wrote: basically i have a cstring and i want to use one function which takes char * parameters now i want to pass the value that is in cstring to this function how can i do that
Well if _UNICODE is defined then you will have to do some additional chores for converting to char* (Read this[^] for more info), else it's quite easy
CString csStr = "Non unicode string";
char *szStr = csStr.GetBuffer(0);
AFunctionToCall( szStr );
csStr.ReleaseBuffer(); Well if you need a const char* , it's much more easier
CString csStr = "Non unicode string";
const char* szStr = csStr;
AFunctionToCall( szStr );
|
|
|
|
|
use CString::GetBuffer() with CString::GetLength() to copy the enitre string into the char*.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Unless a copy is actually what is desired, there is no need to copy the data for this. GetBuffer returns a valid char* that can be used until you call ReleaseBuffer (at which time the CString object will be updated with the changes you made to the buffer).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
CString is replacable with char, ie you can put in a CString when a char[] is required.
try putting in a reference to your CString ie &string
|
|
|
|
|
I use SHBrowseForFolder to display folder select dialog. How detect folder change (create new, delete, ...) while this dialog displaying.
Thank for your answer.
|
|
|
|