|
memory means you r want to delete the pointers ?You can release them by calling Release() method of IUnknown interface.
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
Hi everyone,
Well my propblem goes like this. First of all i want to let you know that the project that I have developed works under WinME , Win98SE and Win95B without any problems. I ran into this problem when someone wanted to install this on a Win95A machine. We also found out that this problem is also consistant on a win98 machine too. This project is being developed for the Federal Aviation Admisintraion (FAA) for Windows98 first edition based machines.
Well i developed this project with 4 activeX components and compiled this program and then used install shield to make a distribution of this program. When i installed this program on the WIN95A and Win98 machines they did not put the proper icon on the desktop. They inserted the MFC icon for its executable. That gave me an idea that soemything was wrong. After that i tried to run the program with double clciking on the icon and the hour glass ran and nothing happened. I found out that that machine had a 16 bit FAT partition so i tranformed that into 32 bit on the Win98 machine with its utility. Win95a u dont have this option ofcourse. I also used REGSVR32.exe to register the COMDLG32.OCX object. But this object in my instalation file was there without the DLL file. So i went ahead and registered that and it was succesful in registering. I rebooted as usual and nothing was working again. But the icon was correct this time. Well after that i decided to install VC++ compiler on that machine and saw that the project hada problem registering the AvctiveX Components. So i couldnt recompile the project on that machine to get this thing to run.
Well i am pretty much running out of options. I read afew articles that were online but i am a little puzzled. I need a little bit more insight and someone to tell me what exactly the problem is.
Thanks for your help
|
|
|
|
|
Why I can not implement a class synk in my client for the tipe objectEvent form the Server???
And what I must to do to have in my client just a class synk in witch a call just invokeHelp....????
thanks
Bogdan
|
|
|
|
|
Hi can anyone point me in the direction of any good COM+ resources or websites, specifically I'm interested in COM+ events.
Thanks
Phil Harding
|
|
|
|
|
I use a asynchronous property in my ActiveX control to implement the background of my control.
In the "OnDraw" function, I use the following tactic:
if(GetReadyState()==READYSTATE_COMPLETE)
{
//draw with the background picture
... ...
}
else
{
//draw without the background pictrue
... ...
}
In the "OnDataAvailable" function:
I check the status. If the status is "BSCF_LASTDATANOTIFICATION", I will set the status of the control to "READYSTATE_COMPLETE" and force the control to redraw itself(invalidaing the control).
In the "Set" function of the property:
I just use the function "SetModifiedFlag".
My Question is:
If I changed the value of the asynchronous property, can the background of the picture redraw automatically? Shall I add a statement to reset the status in the "Set" funtion of the property?
Thanks.
Maer.
|
|
|
|
|
I have read some articles about the benifits of the Compound File and structured storage. In my opinions, I think one of the benifits of the Compound File is that we can load only a part of the whole document that we need and not have to load all part of the document. It saves a lot of time and simplified the programming.
In the Container Application, the functionality is very clear. For example, suppose a CxxxDocument that contain several bitmaps, we can only load the right one that we want to edit by activating the item from the representation chart. The memory only load the exact part of the document.
I have used the VC++ Debug Tools to trace the MFC source codes of it. I find out the MFC Framework use a linklist data structure to store and load the OLE Items from the document.
But in the with Server Application, the functionality is not very clear. I also trace the MFC source codes. I find out the server document also use a linklist data struture to store and load Server Items. If we use "embed" tactic, there will be only one node in the linklist. If we use "link" tactic, there can be more nodes in the linklist.
It is well known that the Compound File can contain items and use them individually like the document of container application containing OLE items in the linklist.
So my question is: Since the document of the server application is Compound-File enabled, the document also can contain items to manipulate. Are the objects of class COleServerItem the items that we can use structured stroage tactic to manipulate(like the OLE items in the container's document)? Are they built on the basis of COM? Or are they only pure ordinary data streams in the document and these kind of objects can not be manipulaite individually.
Thanks.
Maer
|
|
|
|
|
In the "OnCreate" funtion of the class "CInPlaceFrame" of a Server Application, there is a statement like this "m_dropTarget.Register(this)". Here are the comments from Microsoft:
// By default, it is a good idea to register a drop-target that does
// nothing with your frame window. This prevents drops from
// "falling through" to a container that supports drag-drop.
The statement really puzzles me. When we are programming in a Container Application, this statement is to register a drag-drop target. But in a Server Application, I can not see the funtion of the statement. If I remove the statement, my server application runs like before.
So my question is:
What is the function of the statement "m_dropTarget.Register(this)"? Can you give me an example?
Thanks.
Maer
|
|
|
|
|
How can I get VB interface to my VC project???
plz help me.
|
|
|
|
|
You can expose methods in your VC project using by making a COM object. The details of this are a deep and long subject. Consult MSDN for a while.
or, Use Add New ATL Object and follow the wizard...
Thanks for the help,
Bill
|
|
|
|
|
Hi,
I am in great need of some info. I've developed an active x control and i have pruchased a certificat to sign it.
now i need to make a cab file and then sign it.
I have searched msdn far and wide and in circles looking for a program called cabarc and the other tools that are with the CAB software development kit, but all the links are broken and lead no were. if there is any one that can help please do.
|
|
|
|
|
I posted the CAB SDK here.
--Mike--
http://home.inreach.com/mdunn/
A recent survey reports that 1/4 of all internet users in England surf for porn.
The other 3/4 just didn't want to admit it.
|
|
|
|
|
How can i use a VB dll as a server in my VC client?
I do it like that?
----------------------------------------
#import "VBActiveX.dll"
...
...
VBProjectName._VBClassNamePtr ptr;
ptr->methodname(...);
----------------------------------
But this throw an invalid pointer.
can any one help me???
|
|
|
|
|
Hi,
U need to call as like in the following code..
#import "VBActiveX"
....
....
....
HRESULT hresult;
CLSID clsid;
CoInitialize(NULL); //initialize COM library
hresult=CLSIDFromProgID(OLESTR("VBActiveX.clsdll"), &clsid); //retrieve CLSID of component
_clsdll *t;
hresult=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(_clsdll),(LPVOID *) &t);
if(FAILED(hresult))
{
AfxMessageBox("Creation Failed");
return;
}
t->Function_call(); //call method
t->Release(); //call method
CoUninitialize(); //Unintialize the COM library
Raja
|
|
|
|
|
I'm trying to use a vb activex dll in a vc app. I get the following debug error when calling a method that takes a couple of double parameters.
' the value of ESP was not saved properly across a function call. this is usually the result of calling a function with one calling convention with a function pointer declared with a different calling convention'
I understand that this calling convension problem is caused by the _stdcall calling convention that all com dll's seem to need, esp. in the context of mixed language programming and when used by a vc client.
is there a work around without changing the vb code or calling convension?
where can get to read more about this specific problem?
TIA.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
I had the same problem, when I tried to use a dll made with VB from VC++.
For me was imposible to find the type of variable to pass to VB, I debuged with assembler and was imposible for me to get the type of variable that need to recibe the vb Dll.
Is Easy to use a dll in VC from VB but the invert way seem imposible.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
hello carlos,
thanks for your response. you know, the strangest part is that when I tried to use it with ATL, I get this error. however I got the ocx from the client with similar functionality as dll, and with MFC implementation, it seems to work fine.
What is the method you were using? I was trying to import the server's typelib with #import and use the methods/calls with regular compiler generated smart pointers.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
Hey all-
I've used ATL/COM quite a bit, but I've always designed my apps from scratch to take parameters and return values using the standard types (strings, numbers, etc).
Ok, now I have to wrap some functionality from a big app into a com object, and in a number of cases a pointer to a class is returned from a function, or a function takes a class or some other user defined type, etc. Basically, the job is ripping out some classes from a big mfc app and putting it in a com object.
Great, but how to do it? I can't pass a custom object around (or I haven't been able to pass it using a VARIANT), and the amount of time to rewrite everything to be COM-friendly would far exceed the allotted time.
I've searched Google as well as here and CodeGuru, but find nothing about this particular problem. I believe you can do it with straight DLLs, so I don't know why you couldn't also do it with com objects as well.
Thanks for any info,
Ron
|
|
|
|
|
I'm having the same problem...
I finally gave up and separated the attributes into individual arguments.
Ther must be some way to get the structure into a VARIANT. The last thing (I didn't try) was to put it into a SAFEARRAY of object pointers...
If you find out how, please let me know.
Thanks for the help,
Bill
|
|
|
|
|
In COM, as far as i know, custom data types/objects can be passed as structures. This can be passed from server to client.
But, if u really want to use the functionality of class, pass the interfaces from server to client and using that call the class functions and make those funtions also return interface pointers, using which again u can access the class.
But, all these are theoriticall speaking and if needed may be i can create a sample for it. But i dont know ur requirements.
Ganesh.M.Ramaswamy
|
|
|
|
|
The definition of the datatype has to be added to the interface and the pointer should be of that datatype. Then you can pass custom datatypes.
In MSDN index, type in "struct", it will bring up one for IDL/MIDL. You should be able to take it up from there.
- Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I've written an ATL object making use of MFC. It works fine when tested in VB using the New operator and refrencing the .lib file from the project refrences. It does not work when using CreateObject, in that CreateObject cannot create an instance, more or less saying it does not exist - VB error 424. I want to use it in both perl and ASP scripts.
Anyone know why this is? I must have missed something.
Thanks,
Giles
|
|
|
|
|
Hello,
I have written an exchange extension for outlook. one of its functions is to create tasks. it works fine in ol2000 and it creates the tasks fine in ol97 except that each Subject of a task is set either to
C:\WINDOWS\SYSTEM32\stdole32.tlb
or
another equal ambigous string comprising of a GUID and whole lot of hashes (#) and numbers with C:\IMPU\DEV\B32\stdole.tlb
no matter what i put in the param this are the only two strings it displays. I set the Subject by using just a standard QueryInterface,Invoke syntax. I also set other string fields in the task and they get put in fine (ol2000 and ol97)
has anyone else experienced similar problems?
Rob Grundel
Software Engineer
Pitt & Sherry IT
rgrundel@pittsh.com.au
ph: (03) 63231931
mob ph: 0417762243
|
|
|
|
|
I have a question about drap-drop. It is a question about register a drag-drop target in a server application. Here is my question:
In the "OnCreate" funtion of the class "CInPlaceFrame" of a Server Application, there is a statement like this "m_dropTarget.Register(this)". Here are the comments from Microsoft:
// By default, it is a good idea to register a drop-target that does
// nothing with your frame window. This prevents drops from
// "falling through" to a container that supports drag-drop.
The statement really puzzles me. When we are programming in a Container Application, this statement is to register a drag-drop target. But in a Server Application, I can not see the funtion of the statement. If I remove the statement, my server application runs like before.
What is the function of the statement "m_dropTarget.Register(this)" here(besides registering a drag-drop target)?
Why nothing different happens when I removing the statement?
|
|
|
|
|
I have a client and a remote server component. I want to access the remote server object without having to set the access rights using dcomcnfg.exe.
How can I do this programmatically? I know it can be done using CoInitalizeSecurity on the server side and CoCreateInstanceEx on the client side. But I don't know what parameters I must enter to give a specific user account (or access key ?) rights to access (and launch ?) the server component.
Anyone got some advice ?
Regards,
Brian
|
|
|
|
|
Is there a function that returns the rclsid of a com object given the progID? Basically, I want to use the CoCreateInstance function to create a com object, but getting the class id is a pain.
Thanks.
|
|
|
|