|
When running my program on a 98 box, everything seems to go through smoothly. When running on a Win2000 box, it crashes. I have isolated a commonality between this issue and few other issues in that somewhere along the line it has to display the MSFLEXGRID OCX control. Does there happen to be an extra step in getting the MSFLEXGRID control registered for Win2000? Or perhaps it is registered and it's just something else. It seems 98 recognizes the control.
Thanks!
Chris
Customer: "It seems you have bugs that are inconsistent!"
Support: "We have a patch that makes them consistent."
|
|
|
|
|
all
Is there any way to catch com event from console app?? a short sample code will be great.
psksvp
|
|
|
|
|
Hi
I have serialized my data into an xml file.Now I want to implement IStorage methods and expose those methods to encapsulate my xml code.
To achieve this what I have to do?I want to pass IXMLDOMDocument pointer
to IStorage methods.Can I do this?or how to do?
Thanks in advance
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
Why can't you use the IXMLDOMDocument methods load and save?
|
|
|
|
|
I was trying to create a WTL based dialog app that had a DateTimePicker on it but can't seem to get it working. When I try to create the contol all I get in return is NULL.
CDateTimePickerCtrl Date;
HWND hWnd = Date.Create(...)
if(NULL == hWnd)
//What happened?
|
|
|
|
|
Did you call InitCommonControls() ?
--Mike--
http://home.inreach.com/mdunn/
"Holding the away team at bay with a non-functioning phaser was an act of unmitigated gall. I admire gall."
-- Lt. Cmdr. Worf
|
|
|
|
|
Its always the simple things. Thanks.
|
|
|
|
|
How do i add an interface with CString as its parameter
i.e. HESULT Calc(CString)
Since CString is a mfc class ,the compiler cannot recognise CString defined in the .IDL file?
please help its urgent.
|
|
|
|
|
To use string use BSTR.
HRESULT Calc(BSTR strParam).
HTH
Jignesh
|
|
|
|
|
Jignesh is correct, the correct way to pass strings in COM is the hated BSTR.
There is a good article by Joseph Newcomer on CString that covers CString to BSTR to CString conversions very well. It is at:
http://www.pgh.net/~newcomer/cstring.htm#CString to BSTR
Jim
|
|
|
|
|
Why reinvent the wheel.
USES_CONVERSION;
A2OLE, OLE2A, A2BSTR, BSTR2A, etc...
|
|
|
|
|
I had an eariler issue dealing with DAO access causing a program to crash. Apparently installing MDAC and DAOSDK solves that issue. (thanks to those who helped on this matter ) However now I am noticing a problem with COM, more specifically MSFLEXGRID. I have a MSFLEXGRID control in the program and I am noticing that within the main window it is not showing up and within a dialog box it is causing the program to crash long before it paints.
Are there more installs that need to happen?
I noticed this all worked when I had VC++ installed.
Thanks!
Chris
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
how can i pass a map as a in parameter or out parameter ?
I need [out,retval] mymap and
[in] mymap something like this
how can i achieve this ?
parag
|
|
|
|
|
YOu can't. At least not without some serious hacking. C++ specific entities such as maps, lists, etc. were never made to be passed across COM boundaries. You cannot define them sufficiently for MIDL to handle them.
|
|
|
|
|
I would like to talk to Programmers/Trainers that would be interested in teaching COM+ courses for Absolute Solutions, Inc. Absolute Solutions, Inc. is a computer training and consulting firm that is located in Bloomingdale, IL. If someone is interested, please, email your resume to mverma@absolutesolutions.com. Also, if you know someone that might be interested, please, pass this information on to them. Thank you.
|
|
|
|
|
Hi Guys,
I have been using ADO to execute queries asynchronisly. I am using adUserServer as Cursor location and adAsyncExecute flag to run the query using Recordset-->Open method.But the problem is if i cancel the query in between i get the following error:
Error No : 3712
Description: Opeartion has been cancelled by the user.
I don't understand why.
And if i use Command object's Execute method to run my query, then the query dosen't seems to run asynchrosnly.
Did anybody worked with ADO async queries?
Any help in this regard would be highly appreciated.
Cheers,
Mukesh
|
|
|
|
|
Hypothetically,
if I wanted to pass pointers to CComPtr classes around, given that the & operator has an override to return the member pointer data, how would I get the address of the actual CComPtr class?
...and if there is an easy way to do this for a CComPtr, is there a general solution for classes that overide the & operator (i.e. some C++ syntax that has eluded me thus far)???
Any help appreciated...
|
|
|
|
|
I have a User control in a dll (that I created in C#). I've already created the type library and registered it as a global assembly. My question is, how do I actually use this control in VB6 or VC6? I've tried simply adding the ActiveX control using the project references in VB6, but it won't accept it (because it is not an ocx). Is there a way to actually reference the dll and add the user control on the fly?
"Desire is not an occupation"
|
|
|
|
|
I don't believe you can use something created with C# in VC6. The component needs the .NET CLR which VC^ knows nothing about.
You can use VC6 code in .NET by using using the managed/unmanaged facilities
|
|
|
|
|
I've recently written a shell extension that extracts the bitmap preview from AutoCAD drawing files and displays them when viewing folders as web pages. Everything works great except for one thing.
The problem is that when the folder is viewed as Thumbnails, the shell shows the same preview image for *all* DWG files in the folder (whichever one was last selected). At first, even refreshing the thumbnails didn't solve the problem so I modified my implementation of IExtractImage::GetLocation to enable shell caching. That only sort of works. The images are still the same but at least you can refresh them to get the correct preview.
Does anyone know what is causing this problem and how I may prevent it from occuring in the first place?
|
|
|
|
|
I'm working on an activex control that will sit in a webpage. I'm looking to add icons to me TreeView and am having trouble getting an ImageList set up.
So far I've done this:
CoCreateInstance(CLSID_ImageList,
NULL,CLSCTX_INPROC_SERVER,IID_IImageList,(void** &m_ImageList);
CoCreateInstance(CLSID_ListImages,
NULL,CLSCTX_INPROC_SERVER,IID_IImages,(void**)&m_Images);
Since I see that an ImageList needs the Image collection put into it, but then the Image Collection needs Images put into it and I have no idea how to set that up.
Anyone have any tips or links?
-Jack Mott
jackm@scalablesoftware.com
|
|
|
|
|
I cannot add a second interface (derived from IDispatch). I have a feeling I am doing something fundamentally wrong (like maybe it can't be done?).
Here is the code:
// TestDisp.idl : IDL source for TestDisp.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (TestDisp.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(050877DD-6973-11D5-BF78-0050DA22A717),
dual,
helpstring("IObj1 Interface"),
pointer_default(unique)
]
interface IObj1 : IDispatch
{
[id(1), helpstring("method FirstMethod")] HRESULT FirstMethod(BSTR Junk);
};
//Added:
[
object,
uuid(050877DD-6973-11D5-BF78-0050DA22A718),
dual,
helpstring("IObj2 Interface"),
pointer_default(unique)
]
//Added:
interface IObj2 : IDispatch
{
[helpstring("method Method2")] HRESULT Method2(BSTR Crud);
};
[
uuid(050877D0-6973-11D5-BF78-0050DA22A717),
version(1.0),
helpstring("TestDisp 1.0 Type Library")
]
library TESTDISPLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(050877DE-6973-11D5-BF78-0050DA22A717),
helpstring("Obj1 Class")
]
coclass Obj1
{
[default] interface IObj1;
interface IObj2; //Added
};
};
// Obj1.h : Declaration of the CObj1
#ifndef __OBJ1_H_
#define __OBJ1_H_
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CObj1
//< AND > Characters changed to [ and ], since I can't figure
//out how to get them to display in a web page properly!
class ATL_NO_VTABLE CObj1 :
public CComObjectRootEx[CComSingleThreadModel],
public CComCoClass[CObj1, &CLSID_Obj1],
public IDispatchImpl[IObj1, &IID_IObj1, &LIBID_TESTDISPLib],
public IDispatchImpl[IObj2, &IID_IObj2, &LIBID_TESTDISPLib] //Added (this creates the error)
{
public:
CObj1()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_OBJ1)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CObj1)
COM_INTERFACE_ENTRY(IObj1)
COM_INTERFACE_ENTRY(IObj2) //Added
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
// IObj1
public:
STDMETHOD(FirstMethod)(BSTR Junk);
};
#endif //__OBJ1_H_
Here is the error I get:
testdisp\obj1.h(28) : error C2594: 'static_cast' : ambiguous conversions from 'class CObj1 *' to 'struct IDispatch *'
|
|
|
|
|
Hi Dave,
You are deriving a new class from two other classes that both
implement IDispatch, therefore the compiler does not know which
one to use.
You can select which one should be implemented in your new class
in your COM_MAP by using COM_INTERFACE_ENTRY2 instead of COM_INTERFACE_ENTRY:
COM_INTERFACE_ENTRY(IObj1)
COM_INTERFACE_ENTRY2(IDispatch, IObj2)
//COM_INTERFACE_ENTRY(IDispatch) // Removed
See the COM_INTERFACE_ENTRY2 docs.
Hope this helps (and it is the correct answer
Alwin Beukers
|
|
|
|
|
Hi,
I'm writing a control to return a Picture Object for use with Visual Basic, but I'm having problems figuring out how to return the IPictureDisp in ATL. I have the IPictureDisp object but I don't know how to return the reference.
Can anyone offer suggestions or pointers to some example code on how to return the Picture Object? Any help/comments appreciated.
Thanks!
-RB
Rick@eBoyer.Net
|
|
|
|
|
See
http://www.vbpj.com/upload/free/features/vbpj/1999/04apr99/vp0499/vp0499.asp
Bjarke Viksoe
My code at: http://www.viksoe.dk
|
|
|
|