|
So,
m_Tree.SetImageList(&imList,TVSIL_NORMAL);
caused a runtime error, you said?
What kind of error you had at this time?
If you had application error like 0xc0000005, some pointer maybe invalid.
Other error, I cannot imagine the situation at this time.
|
|
|
|
|
Yes it is an application error where it refers to some address claiming the memory could not be "read". However, if that statement is commented out all seems to run fine. So all I can conclude from this is that the problem lies in these 2 code statements of Attach and SetImageList functions. I really can't figure out what could possibly be causing this and am really close to giving up on the idea of adding images! Please Help!
Exactly the error is as follows:
The instruction at "0x00405652" referenced memory at "0x00000004".The memory could not be "read".
modified on Friday, June 19, 2009 2:27 AM
|
|
|
|
|
> referenced memory at "0x00000004".
This usually means that offset 4 of pointer which points null is not accessible.
So you can check the member whether null or not of imList.
If you use visual studio IDE, you can step into codes and can check any data is null or not.
|
|
|
|
|
Hey,
I think that I've found a problem in your code. Please see the modified code below,
<br />
SP_CLASSIMAGELIST_DATA imageList = {0};<br />
int imIndex;<br />
CImageList imList;<br />
imageList.cbSize=sizeof(SP_CLASSIMAGELIST_DATA);<br />
SetupDiGetClassImageList(&imageList);<br />
imList.Attach(imageList.ImageList);<br />
m_Tree.SetImageList(&imList,TVSIL_NORMAL);<br />
Hope it helps..
|
|
|
|
|
|
If you open the dll as a "resource" in msdev or devenv then you can edit copyright information.
|
|
|
|
|
Is it a dll owned by your firm....
Beware that you are not violating the copyright norms
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hai!
In any MFC dialog based application if we go to Resource view->and click on Version
we get a version info of our application in the version info there are two bocks :
1. FILEVERSION 1,0,0,1 and PRODUCTVERSION 1,0,0,1 etc
then a black line as separator then
2. Block header, Comments , company name and then File vesion product version etc.
Now i need to get the file version of my application programatically, i am currently using GetFileVersionInfo (), this function gets the file version fron 2nd or lower block, i need the file version from 1st block FILEVERSION, is there any direct function??
Thanks!
|
|
|
|
|
kapardhi wrote: Now i need to get the file version of my application programatically, i am currently using GetFileVersionInfo (), this function gets the file version fron 2nd or lower block, i need the file version from 1st block FILEVERSION, is there any direct function??
User GetFileVersionInfo function. For a demo have a look at the Process viewer[^] application.
|
|
|
|
|
Sorry for not providing a detailed information!
I actually want to get the version information programmatically for a Pocket PC WIN CE device, I am developing the application in eVC++
I have used GetFileVersionSize (), GetFileVersionInfo (), VerQueryValue() in Visual studio 2005, which was working but not in eVC++
Can i get version information for a PocketPC Application, because if i implement the above functions i get 1814 as error using GetLastError() after executing GetFileVersionInfo() stating "The specified resource name cannot be found in the image file." what does this mean ??
Thanks!
|
|
|
|
|
|
I currently have an application, that tracks activity for any changes in an external app. I am using windows enum to keep track of all instances of that application and open windows. In case if any user decides to have a multiple instances running. However I only get the active window first hence my process only goes after the active window, by the time it's done processing the user could have changed to the second window and I would miss any changes that have been made in the second window.
What I would like to do, not even sure if it's do able or is it beyond my level of expertise, which practically is a bigginer.
My application to be able to open a thread or something for every window thats open for the external app. Message back to my app probably using IPC, Post Window Message or some sort of communication to process the changes based on the window thats opened in the external app. In other words if 10 windows are open, have 10 different threads go after each window. Is this really how I should do it or is there a better way?
Please could someone shed some light and tell me if there is a better way to do it.
Thanks a Million.
|
|
|
|
|
sounds interesting, but what sort of monitoring are you doing of this 'external app' and why ? it sounds dangerously close to writing 'spy software' - dont get me wrong, you may have a valid reason, but if someone came to me with a request like that I'd sure as heck be asking them to validate why first and then what.
Its not 100% clear what changes "any changes in an external app" you're looking for - depending on what you're looking for you could use API hooking, for example, to track when users open files for example - you could look at the Microsoft 'detours' library for what I mean. Its also not hard to track lists of processes, windows etc and relate them - so I think you need to supply more details
Ultimately, and Im guessing you dont, but having the source and injecting log/trace points into it would be easier than watching it from the outside in ..
some links you may like to see (in addidtion to looking at MS 'Detours') :-
Detecting Windows NT/2K process execution[^]
API hooking revealed[^]
(for example)
'g'
|
|
|
|
|
Yeah, I hear your valid reason for this. The vendor has decided not to support the application. I have been against using detours or hooking as a long term solution for the sher reason of acting as a spy. The other main reason is, we have different vendors for different applications. Not sure if you can even find out, but if it is trackable that a hook is running, they could end up terminating their services in an anticipation of the hook is hooking into their system.
|
|
|
|
|
FISH786 wrote: Not sure if you can even find out, but if it is trackable that a hook is running, they could end up terminating their services in an anticipation of the hook is hooking into their system.
ok, surely though, if "The vendor has decided not to support the application " ... that gives you leeway to 'do what you must'
sounds like a yuckky situation, sorry I cant help more
'g'
|
|
|
|
|
However, am I right, a system that has been hooked is dectactable in knowing that a hook is running? I don't want to have problems with the other vendors? Could you at least answer this for me?
|
|
|
|
|
I'd say no, a program wouldnt necessarily know its being hooked - the idea of hooking is to transparently capture (& redirect) API calls for example... so to inject a hook and get it wrong would crash/corrupt the in-memory copy of your program, which is not what you want .. hence the ability for hooks to be considered malicious
'g'
|
|
|
|
|
Last question, If it's not detactable, if you were in my shoe, would you use the hook over a short period of time and get it over with without worrying about other vendors, or use the threading option and be safe with other vendors?
Which option would you choose, I can only see the hook being installed for a week or tops a month?
|
|
|
|
|
FISH786 wrote: I currently have an application, that tracks activity for any changes in an external app.
How are you changing it? What changes are being made?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello David,
It's just normal user dataentry, and trying to get screen shots of what the user does in that application.
|
|
|
|
|
Is there any API in C programming language which can help in retrieving the certificate from the keystore and aslo the keys from the certificate?????????
|
|
|
|
|
shrims4u wrote: Is there any API in C programming language which can help in retrieving the certificate from the keystore
From the MSDN Cryptography Documentation[^]
"Certificate and certificate store functions manage the use, storage, and retrieval of certificates"
|
|
|
|
|
Thanks but can it be used in linux???
How to download dat API ???
|
|
|
|
|
shrims4u wrote: Thanks but can it be used in linux???
How to download dat API ???
Apparently you have no business working on that project. Tell whoever it is for that you are not qualified and they need to find someone else. Then you can go back to studying beginner programming material to learn things you need to know BEFORE developing solutions. Or you can change careers, the choice is yours.
|
|
|
|
|
I want to make the computer believe that a joystick is attached and use key presses on keyboard to simulate joystick actions. Have been searching for few hours on google but found nothing
Will be great if somebody can point me in right direction on what i should be searching for. The keyboards on how to do it and rest I can search and try on my own.
|
|
|
|