|
Hello, I have an swf embedded into an MFC dialog window. MFC is staically linked, Swf embed=true.
The swf appears to be compiled into the exe.
My question: Is there ANY way that someone could extract the swf from the exe?
It is very important that this is impossible, as the swf can not be unprotected.
|
|
|
|
|
can you help me the way to combine DLL and EXE files into 1 single file ? and the way to group DLL files into 1 single DLL files. I'm using .NET language.
thanks
|
|
|
|
|
Hi all,
I have written an application in which I embed powerpoint in my application using COM. But the problem is I'm getting some version dependencies in office...I'm facing some problem when I am running with different powerpoint(MsOffice) versions(Office 98,2000 or XP).
How to know to which version of powerpoint I'm linking so that I can make my application version inependent...
Plz help,
Regards,
sam.
|
|
|
|
|
Well, you have an obvious solution - write a different version application for each version of Powerpoint.
There is a more elegant approach. This is pretty complicated to even explain. You'll have to be pretty strong on COM to be able to program this effectively.
Basically since your application needs to be compatible with different versions of the PowerPoint object library, you must decouple the application from any direct reference to the object library itself. That means you need to code your application against an abstract interface definition instead of the Powerpoint library itself.
You also have to create implementation DLLs for each version of PowerPoint you support. These have to contain concrete impementation classes and be compiled against the correct version of the Powerpoint object library.
Finally, you have to create a Class Factory that determines which version of Powerpoint is installed, and registers the correct implementation DLL at runtime, then returns the concrete Powerpoint class from the appropriate DLL that implements the abstract interface definition.
You install all concrete implementation DLLs on the target machine but you do not register any of them, because only the one that matches the current version of Powerpoint on the machine will register correctly anyway.
Since the Class Factory determines at runtime which version is currently installed, and actually registers the correct concrete implmentation DLL and then returns the implementation class, if your user decides to upgrade from example Office 98 to Office 2000, then the class factory will recognize that and automatically upgrade the concrete implmentation DLL.
Like I said, elegant, but not simple.
Robert
|
|
|
|
|
Hi Robert,
Thanx a lot for ur suggestion, however ,I'm quite an amateur in COM to try out all this.....
Still I'll give it a try...
1 more question:- I want to call some COM interface functions in a separate thread.. How to do that? I called CoInitialize() and then tried calling inside the new thread...but it didn't work out...
Plz help.....
Thanks & regards,
sam.
|
|
|
|
|
Hi,
Is it possible to remove icons in the system tray, without stopping the process Ideally the function would take the process name and remove the icon. I know it can be done as I've seen tools which do it. Ideally through VBS but C++ would do as well.
I've searched plenty via Google and all I can find are articles on how to add icons
Thanks
|
|
|
|
|
no the systray only allows the process that registers itself to remove itself.
You can kill the explorer process (which is not a good option) to remove the element.
you can try to hook into the explorer process to determine where the registration section for the tray is but you would need to know what your looking for. Again is not a good option
|
|
|
|
|
I wrote a com object with ATL, it has a test function, which declared like "HRESULT test([in]byte* aaa);" ; I wrote the following code in a html file, want to call test function, but always get error message "type not match". Who can tell me is it possible to call test using VBScript and how to .
my script code:
Dim MyObj
Set MyObj = CreateObject("Test.Test")
Dim data(5)
data(0) = CByte(97)
data(1) = CByte(97)
data(2) = CByte(97)
data(3) = CByte(97)
data(4) = CByte(97)
data(5) = CByte(97)
MyObj.test data
|
|
|
|
|
VBScript is an untyped language, or more correctly all types in VBScript are VARIANT.
The problem is not in your VBScript, it is in your ATL method definition. To pass an array of any type into an ATL COM object from VBScript, you have to make several changes:
1) The parameter must be declared as [in, out] to force it to be passed ByRef instead of ByVal.
2) The parameter must be declared as a VARIANT* type.
3) You have to write additional code in the ATL function to convert the VARIANT* array into a byte array.
So, your new function definition must be:
"HRESULT test([in, out] VARIANT* aaa);"
Once you have passed the array into the ATL COM object you need to access it as a SAFEARRAY and retrieve the values as VARIANTS then cast them to bytes.
For more info see:
http://support.microsoft.com/kb/218454/EN-US/[^]
Robert
|
|
|
|
|
Hi,
I've got a COM component that needs to read/write browser cookies (the component is on the client machine and does not run in the context of an IE Toolbar or the like). Are there any API's available to do this or will I need to roll my own?
Thanks in advance,
-Robin
|
|
|
|
|
You probably want InternetGetCookie[Ex] and InternetSetCookie[Ex].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
That does the trick, thanks!
|
|
|
|
|
RCox wrote:
does the trick
sdgsdfgdgdfgdfgdfgdgd
|
|
|
|
|
How can i get cookie expiration date?
|
|
|
|
|
What is the difference between COM, ActiveX and DLL ?
|
|
|
|
|
A DLL is a Dynamic Link Library. This is a binary file, that can contain almost anything: methods, resources (menus, Dialogs, images, and so forth), and, of course, references to other DLLs.
COM is the binary standard for programatically creating components (in any language). Go to the Microsoft COM page for more information on this subject.
ActiveX is a Microsoft designation for components that are created using the COM technology.
My answers given here are vastly simplified versions of what you can find at the offocial Micorosft Site. But, they are all very important (so, read, read, read until your brain is full).
|
|
|
|
|
I've a MTS/COM+ component (COMPONENT_1) that #import s ADO library. And, I have another MTS/COM+ component (COMPONENT_2) that #import s this component (i.e. COMPONENT_1). I need to use ADO objects in my second component (COMPONENT_2) too. If I use #import in my second component, I get lots of errors. If I do not, the MIDL compiler remains unable to recognize _Recordset data type.
Or, lets say that I do not use ADO in my second component at all i.e. I use IDispatch instead of _Recordset pointers to receive recordsets. This solves the problem but gives birth to a new problem. ADO recordsets loose their current position i.e. it moves to the first record if type casted to IDispatch pointers. I dont know why.
Can anyone please show me how to do it? I am using ATL with Visual C++ 6.0 SP5.
Thanks
Gurmeet BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
|
hi!
i have tried to store bitmap image into my activex control. i used the following Put property to store image.
[propput, id(7), helpstring("property CompanyLogo")] HRESULT CompanyLogo([in] IPictureDisp * newVal);
and in it i wrote following four lines of code.
m_pCompLogoDisp = newVal;
SetDirty(true);
SendOnDataChange();
FireViewChange();
The property is receiving image data but not persisting it.
does my property declarion incorrect. if so then plz help me.
Thanks in advance.
|
|
|
|
|
Hi,
I am learning COM, please provide me some documents for Biggners.
Anil
|
|
|
|
|
http://www.codeproject.com/com/COM_from_scratch_1.asp
Just started studying COM, this one seems one of the best I found (if not the best at all).
The article requires C++ knowledge, since code it contains sample in C++.
|
|
|
|
|
Me: looking to fill Senior VC++, COM, UI programming position in NYC.
You: Fantastic programmer looking for interesting position in NYC.
Please send me a resume.
|
|
|
|
|
|
Hi,
I have a customized list control which was developed by subclassing CListCtrl. I have a class derived from CListCtrl. I wish to create an activex list control using this class. I tried to create an MFC ActiveX Control. But the control class is derived from COleControl and any attempt to have multiple inheritance results in ambiguity. I do not have prior knowledge in activex.
Can you please explain how I can do it? I have no prior experience in creating activex controls.
<blink>Aravindan Premkumar
Life is short, enjoy it with a smile as long as it lasts.
|
|
|
|
|
I create a simple ActiveX control using MFC wizzard and add
a simple method "testdlg" to show a test messagebox.
Insert this control into a html using <object> tags, then using vbscript "obj.testdlg" to call the method, it does work and show the test messagebox.
But when I using these vbscript code without <object> tags
"
Dim obj
Set obj = CreateObject("progid")
obj.testdlg
"
it doesn't work.
What's more, I have tried these code in VB, it can also work.
I have to use the ActiveX control in a scripting environment
which only supports vbscript (exclude html).
So can anyone handle this problem?
I really appreciate for your help!
|
|
|
|