|
I found what the issue is. It is not a sleep idle variation, MFC socket classes rely on messages posted to a window, which my service does not have.
Michael A Barnhart
mabtech@swbell.net
|
|
|
|
|
I was just wondering. I'm using a third party DLL in an application. I DO have both a release and debug build of the DLL (though no source). I have a full spec of the DLL and know what each function is supposed to do. Is there some way I can 'hook' the DLL in such a way as to 'spy' on it?
|
|
|
|
|
There are a variety of ways:-
Take a look at the deadlock detector by John Robbins in MSJ a year or so back.
That shows one way.
Alternateively write wrapper functions for each function in the DLL and call
your wrapper functions rather than call the DLL directly. Put your 'spy' code
in there.
I've also developed another technique, which uses a fair bit of assembly to
mess about with function APIs to do the job, but that has taken me a year and is
part of a product that will be for sale at some point. As you can imagine,
I'm not about to part with that info. Sorry.
Finally there is a company 'Sarion' I think that sells a product called 'APIus'
which looks like it might do the job you want. I've seen adverts in MSJ/DDJ/WDJ
for it.
Stephen Kellett
|
|
|
|
|
Hello,
i want to visualize a large (1000m x 200m) depot, but using CBmp is blasting my memory. So im lokking for a different way. Anyone got an idea ?
Greets Matthias Schikowsky
|
|
|
|
|
So,
i came across Metafiles. But is it possible to use this method, and if so, how ?
MS
|
|
|
|
|
I look for sample code for capture messages from a window application (like Spy++)
Thanks!
|
|
|
|
|
Tom the source for SPY++ is included with the PLATFORM SDK.
|
|
|
|
|
The only sample i've found is "ControlSpy" but it's not the code source of Spy++!!
|
|
|
|
|
if have an array declared as
> CObArray m_arrRadio;
and i want to add pointers to this array of the following class:
> class CRgbRadio : public CObject
> {
> public:
> int m_iCtrlId;
> int m_iValue;
> };
... and this is the code, where the assertion occurs:
> CRgbRadio* pRadio = new CRgbRadio();
> pRadio->m_iCtrlId = 100;
> pRadio->m_iValue = 1;
> m_arrRadio.Add( pRadio );
while executing the Add-statement i get an assertion in line 182 of the file 'array_o.cpp'. the debug-windows shows the following information:
> ASSERT_VALID fails with illegal vtable pointer.
can anyone explain to me, what's wrong with the code
peter
|
|
|
|
|
Isn't it necessary to use the IMPLEMENT_SERIAL macro when you derive a class from CObject?
What does the code:
CRGBRadio radio;
radio.m_iCtrlID = 100;
radio.m_iValue = 1;
m_arrRadio.Add(&radio);
do?
Just curious: (Seeing the word "RGB") Where are you using it for? Do you have any (usefull) code to convert from RGB to CMYK and vice versa? (Without any loss)
--
Alex Marbus
|
|
|
|
|
unfortunately i must disappoint you. 'RGB' does not have in this reflects anything with a color palette. it is the abbreviation of my project! perhaps, you may right that this somewhat unfortunately on selected.
i doubt, whether i need the IMPLEMENT_SERIAL macro. i nothing want to serialize but want to store pointers in a list. by the way, i get with the macro the same error message.
peter
|
|
|
|
|
Maybe you need to declare a constructor, a destructor, and/or a copy constructor for your class. Perhaps some hidden assignment is causing one of these 'defaults' to be invoked on your object.
|
|
|
|
|
Dear All,
I have developed an application with VC++6sp4 on WinNT4sp6 and everything is fine and dandy. The big problem occurs when I compile the same code on a Win98 machine. All calls to Loadstring fail returning an empty string.
I was wondering if anyone else has experienced this behaviour, and if so how to go about fixing it
Thanks inadvance
Lea
|
|
|
|
|
Lea,
can't say I've ever had this problem. I presume you are refering to the WIN32 API version of LoadString? Looking at it in the MSDN my first guess was that maybe you are having buffer problems, NT being UNICODE and Win98 being...well what is it exactly? (sorry that was not very helpfull was it).
My advice is to try using the API call GetLastError(), which will return you an error code (that may have been set by the LoadString call).
There is an error list in the MSDN some where which will help you decipher what the error code means.
Accept that some days you are the pigeon and some days the statue.
|
|
|
|
|
I have a program that resides on the system tray, and allows me to set the z order of windows, and under Win2K set the transparency also.
I set the transparency using a slider, in a dialog that pops up. The problem is that I have tried making the transparency dialog modeless ( using SW_SHOW and SW_HIDE or delete/new ) and I've tried making it modal with a local variable, but no matter what I try, the second time I bring up the dialog the whole program closes instead. Does anyone have any suggestions for handling dialogs from a system tray application ?
Also, can anyone tell me how I can attach this slider to the window it is effecting, and moving it when that window moves ( i.e. capture OnMove for an external process ) ??
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Has anyone out there developed anything with the WMSDK and gotten it to link in a MFC app. I get the link error
defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
I did what the error message says.. and it still didnt compile.. How do i get MFC to link with the WMSDK(windows media sdk)? Thanks for any help...
-VIk
|
|
|
|
|
Hi all,
I've a questione about use CTreeCtrl. In my application I've a set of objects that represent a tree. I'd like use CTreeCtrl to organize those objects in a tree. I don't want implement a tree structure and then use a CTreeCtrl to visualize it, but I want use CTreeCtrl to maintain (each Item of CTreeCtrl has a DataItem that contain reference to a my Object)and visualize tree structure.
Can I use CTreeCtrl, add Item and its DataItem and when I visualize the structure create a Frame that contain CTreeCtrl? When I close Frame, can I again add new Item and then visualize CTreeCtrl again?
Thanks
|
|
|
|
|
I need to know how to connect to a running instance of Internet Explorer.
I want to monitor the click in any website.If suppose a link for a file is clicked,is should return the link to my application.
If any one can help me regarding this.pl. mail me in detail regarding where i can find info reg. the same..
Thank u
|
|
|
|
|
In my application, i added these 3 lines:
IWebBrowser2* m_pIE = NULL;
IConnectionPointContainer* pCPContainer;
HRESULT hr = m_pIE->QueryInterface(IID_IConnectionPointContainer, (void**)&pCPContainer);
But when i execute the program, there's an acces violation in pCPContainer!!
Why??
|
|
|
|
|
Given The 3 lines of code you have given. The reason is because m_pIE is still NULL. If by chance the code you posted had already given a pointer value to m_pIE then the reason for the access violation is that an effective use (See Effective COM by Sells, Brown, Box) of COM says if you get a pointer and it isn't null and you are going to assign an object to you must release the previous pointer value and then assign. So. QueryInterface most likely is trying to do
<someclass>::QueryInterface(..., LPVOID* pVoid)
{
if (pVoid != NULL)
{
pVoid->Release();
pVoid = NULL;
}
pVoid = static_cast<iconnectionpointcontainer*>this;
// ... more stuff.
}
If you had initialized pCPContainer to NULL in the declaration then the problem would not occur, given the information you have supplied.
Just my 2 cents.
|
|
|
|
|
Hi, all,
maybe somebody knows hwo to work with non-windows devices like printer under WinCE via IR-port using IrDA, IRLMP, etc. The problem is that pronter receives all packages, but inserts -1 at the beginning of each block. This results to garbage in output.
Alex
|
|
|
|
|
I know this insn't quite the place to ask this, BUT there isn't really a message area I could properly put this question / comment!
I've developed a Windows app that runs a .bat batch file. When the batch file is finished I want the DOS box to close automatically, so I just put "exit" as the last line. This didn't work in Win9x (if did in NT) . So I asked a co-worker of mine that only uses Windows under sufferance and would much rather use DOS. Solution to my problem - the last two lines of the batch file must be...
echo off
cls
and when the cls command is run, the DOS box closes
Is this a bug or a feature. If it is a feature, can someone please explain it to me?
|
|
|
|
|
Its a feature.
In win9x (and NT) a console is a process that can be shared by more than one application.
When you exit, Windows just detaches your app (the batch file) from the console process, and the next time it updates the console (minimizes, clears, etc) it will check to see if any apps are actually using it. If not, time to go bye-bye.
Sending the cls gets this check started.
|
|
|
|
|
Hi,
does anybody know if the function WaitForMultipleObjects behaves different on Win98 and Win2000/NT.
I have the following lines in my source :
DWORD dwResult = WaitForMultipleObjects( 5, hThread, TRUE, INFINITE);
if ( !(dwResult==(WAIT_OBJECT_0)))
.
.
.
where hThread is an array of handles to 5 threads and the threads have been started in order 0 to 4.
I think I found out that on Win98 the lowest handle-index is returned and on Win2000/NT the handle-index of the last unsignaled object is returned.
That means : Win2000/NT -> dwResult = 4
Win98 -> dwResult = 0
Did anybody recognize the same effect ?
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
When I try to delete some shortcuts on the desktop the non-standard dialog is appeared. It contains standard text "Do you really want to delete bla-bla-bla" and a new section at bottom: "To uninstall this program go to...". I've saw this feature in Office2k for example.
How can I create such shortcuts?
|
|
|
|