|
Many DLLs come with a companion .lib library that you link your EXEs with (the so called import libraries). This import libraries do automatically the task of loading the associated DLL (thru LoadLibrary and retrieving the addresses of all the DLL functions declared in the DLL's header file through GetProcAddress ). What this libraries don't do is fetch the DLL itself along with your app.
So, if you deploy an EXE statically linked to an import library to a system lacking the corresponding DLL, the program won't even start (a message box appears with a message saying something like "this program requires missing foo.dll").
If the corresponding DLL exists, but it's a prior version than you expected (as it is often the case with comctl32.dll, which is constantly updated by succesive releases of IE), then your program may start and yet show strange behaviors, like featuring list controls without all the graphic gadgets you designed the app for. In that case you should instruct the user to download the appropriate version of the DLL (in the comctl32.dll case the standard requirement is having IE vX.X installed on the target machine).
I strongly suspect your actual problem has precisely to do with comctl32.dll. If so, you might find MSDN article Shell and Common Controls Versions useful.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello everyone!!!
I am using email services of a Microsoft MAPI ActiveX control(msmapi32.ocx) by 2 totally identical instances of MFC apps except that each instance is running on a different server. Both servers have Outlook services installed and proper connections to company's mail server are established, therefore, each server sends email without any problems. Each copy of msmapi32.ocx is properly registered on each server box. My MAPI control is instantiated and interfaced through CWnd wrapper class.
The problem is that one application on one server is working whereas another doesn't.
After dumping log information I have observed the following interesting things:
1) When the working application instantiates component through CWnd's Create() function, wrapper's HWND is NOT 0, BUT the failing application has wrapper's HWND == 0.
2) Even if wrapper's HWND == 0, component's properties and methods can be easily accessed without any exception thrown, but, of course, NO ACTION is DONE.
My questions are:
1) Does anyone know where the problem is?
2) When wrapper's Create() function instantiates OLE control, is "HWND" CORRECT indicator about the success of contorol's instantiation.
3) If 2 is wrong, how can I find out through the CWnd-wrapper object wether the component is breathing or not.
Thanks so much in advance.
Kirill
|
|
|
|
|
I would say having HWND==0 is a clear indication that the ActiveX control is not working.
Is by chance the machine where your app works the one where you have installed your development environment? If so, you might be experiencing problems because the second server needs some sort of license that is already covered by the development license installed on the first machine. I haven't explored the issue in detail, but seems like some sort of license is actually required for using msmapi32.ocx.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi all,
I have a question regarding the use of the CopyImage API function to create a DIBSection from a DDB by specifying the LR_CREATEDIBSECTION flag.
HBITMAP hDib = (HBITMAP)::CopyImage(TheBitmap, IMAGE_BITMAP, 0, 0, LR_COPYRETURNORG | LR_CREATEDIBSECTION);
This works great with Win98. I have been using this method for quite a while now. But I recently posted two articles here on CP (http://www.codeproject.com/useritems/imageviewer.asp and http://www.codeproject.com/useritems/pjaimage.asp) and both articles I have reports back of the code not working properly on NT/W2K.
Is this a valid way of creating a DIBSection and the error is elsewhere? or is this method the cause of the errors?
any comments appreciated
I only have access to Win98, so I can not test this myself
---
Sonork 100.11743 Chicken Little
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
I have download the remote control code here from CP and can't get it to work (any more)!!
The problem is that it can't connect to the server over the LAN!!
Another Winsock app works just fine and it uses CAsyncSocket class...
I know this should be impossible for you to say whats wrong without code example. But you perhaps know something that I don't know...
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
At least you could say what kind of error is showing up (error codes, messages, this kind of things). Here at CodeProject we are not psychics, you know
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
He is trying to do remote control stuff, so he prolly expects remote debugging too, without a debugger of course
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
DAMN me!!
Here is the error (From MSDN):
WSAECONNREFUSED
(10061)
Connection refused.
No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
The error is descriptive enough... seems like the server is not running properly. Try issuing a telnet your_server_ip port where port is the port number used by the app to determine whether the server is running or not.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i would recommend netcat for these issues
very helpful tool!
:wq
|
|
|
|
|
Can you custom draw with in a Listview sdi? I don't see the NM_CUSTDRAW message with in my SDI.
Thanks,
Rob
|
|
|
|
|
I guess you can custom draw a CListView in the same way as you do with CListCtrl s: add ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw) to your message map and then declare&define a void CYourListView::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult) method.
You might want to take a look at Roger Onslow's article Generalizing Custom-Draw to Other MFC Custom Control Classes which generalizes the custom-draw thing to any kind of class supporting it.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks, that worked just fine.
Rob
|
|
|
|
|
I am currently using Rational Purify, and would like to see what other tools are out there that help detect memory leaks. I am working on a largish library (c++) of code, coupled with a mfc gui that instantiates COM objects, as well as provides user scripting abilities via Active Scripting. In particular, are there any good tools that will enable me to detect addref/release mismatches (in addition to the standard "forgetting" to call "delete" leaks)?
thanks for any/all input...
|
|
|
|
|
I am using both Purify & BoundChecker. They can coexists just fine.
Some leaks better detected by BC (Gui & COm) others much better caught by Purify.
First I check with BoundChecker ( better UI + integration ). Next switch to purify rebuild project to rid of BC code.
My main complain about purify is if code containts InitCommonControlsEx calls purify goes nutz.
Brian
|
|
|
|
|
I've also tried Boundschecker but was underwhelmed by its interface and overall "clunkiness". Perhaps I did not evaluate the software sufficiently. Are there other tools (free or otherwise) that will enable to me to check for COM leaks? The other "major" vendor seems to be Parasoft's insure++ but that appears to be hardly COM aware.
|
|
|
|
|
I'm using Vc7 on WinXP Platform to write Fax application. And i have a problem :
- I'm try to receive Incoming fax, and TAPI 3.0 support this by using Fax Service Extended. And to do this, Fax Service support IFaxSever and IFaxSeverNotify interface. As MSDN July 2001, IFaxServerNotify interface require FaxComex.h and Fxscomex.dll. I found Fxcomex.dll file in Windows system directory, but i can't find FaxComex.h file (i'm using Visual Studio.NET Beta 2).
Where do i get this header file ??? Or i misunderstood something ?
Please help me, b/c i only have MSDN document, and it seem to not enough !!!
Waiting for your reply !!!
Thanks in advance !
nvhoang
nvhoang
|
|
|
|
|
I guess you have to download the latest version of Windows Platform SDK. MSDN article Obtaining the Complete SDK tells you how.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How I can read data from bitmap files using opengl? I need to construct a 3D image from a series of 2D slices of that image which are located in bitmap files.
|
|
|
|
|
I may be missing your goal here but I do not see OpenGl as an issue. Just read the bitmap image with anycode you are comfortable with. I do not do much with bitmaps but did look at Davide Pizzolato's code http://www.codeproject.com/bitmap/cximage.asp and feel that I could use it to do handle basic chores. There are many more samples in the http://www.codeproject.com/bitmap/ bitmaps and paletts section. If your slices a lines you will need a schem to create the lines from the points found.
|
|
|
|
|
Hi,
I'm looking for a way to produce a program that will allow the user to store records of particular things they want, but they initially choose what type of data they want to store for the records.
For example, if the user wants to store loads of records consisting of three string types, all the program would need to store are three CStrings (or whatever).
If they want to store say two strings, two true and falses and a number, the program would need to be able to store two CStrings, two BOOLs and an int.
Basically it would be like a custom database, but the problem I've got with it is setting up how the storage would work in an array and saving to file.
At present, I've got 12 fields available (4 strings, 4 BOOLs and 4 ints) and the user can tick or untick them if they want them or not. All fields are stored.
But not only is this wasteful in terms of storage and memory in terms of the fields not being used, but it doesn't give the user as much control as I want to.
I know using an existing database engine would be a lot easier, but has anyone got any ideas or pointers as to how to go about creating a custom one?
Many thanks,
Peter Pearson
|
|
|
|
|
How would I go about making certain labels in my dialog blue, and when you click on them it takes you to a web page? I can't use the MFC class (just using straight Win32), and I can't get the WTL CHyperLink class to work
|
|
|
|
|
The WTL class should work, what problems are your having?
|
|
|
|
|
The ATL declarations in stdafx.h:
// the following lines are required for ATL support
#include "atlbase.h"
extern CComModule _Module;
//#include "atlcom.h"
#include "atlapp.h"
#include "atlwin.h"
#include "atlctrls.h"
#include "shellapi.h"
#include "atlctrlx.h"
The usage of CHyperLink:
CHyperLink MyLink;
// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
MyLink.SubclassWindow(GetDlgItem(hDlg,IDC_MYEMAIL));
return TRUE;
The error:
C:\WINDOWS\Desktop\WP\WulframPoller.cpp(1173) : warning C4003: not enough actual parameters for macro 'SubclassWindow'
C:\WINDOWS\Desktop\WP\WulframPoller.cpp(1173) : error C2059: syntax error : '('
|
|
|
|
|
Is it possible to make a tabbed property sheet, using non-MFC Win32? If so, how?
|
|
|
|