|
thanks for the reply.
THe IshellExitInit initialize method is called each time
the file's context menu is displayed;
At the very least, I need to to persist certain data in memory
across context menu invocations (which works, btw).
best case
scenario is when I can persist data in memory across
invocations of the explorer.exe
(which I can't get working yet)
Has anyone had experience with doing the above, short
of serializing and deserializing at every menu
IshellExitInit::initialize call?
sas
|
|
|
|
|
Are you tring to presist interface pointer(s) across different instance of the explorer ?
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
thanks again for the help.
I'm trying to persist instations of
native contructs (like stl maps)
and a straight C++ class instantations across
different "instances" of explorer.exe. by "instances"
of explorer.exe I mean invocations from the start menu
(looking in the task manager process table; there is only
one explorer.exe process however).
from what i understand, IShellExtInit releated coclass
gets created every time the user right clicks on a
file name (bringing up the context menu). I want these
instances of the coclass to be able to access
my instantiations of my straight C++ class
that lives at the app level (CWinApp dervied class).
i'm pretty sure my problem is memory related;
--
is there a good description on how the shell works
when executing a new isntance of the explorer?
It appearsthat the Esposito Shell programming book
is out of print; this book probably has good info in it.
--
any info is further appreciated.
sas
|
|
|
|
|
Hi,
I'm writing my first ATL control that will be used inside an HTML page. I used the project wizard to create a simple control, I build it and tested it in the ActiveX test container. Now I want to start making my own changes and stepping through the code a bit to see how it works. How can I test a control and set breakpoints in the Visual Studio debugger so that it stops at that point, just like a 'normal' program? Thanks.
|
|
|
|
|
Never mind, I found it (found an article on how to debug a service, it's the same for an activex control): Tools->Debug processes, attach to tstcon32 process.
|
|
|
|
|
You can also for a break point using __asm int 3 . That'll halt the program and show you the "program has crashed dialog, do you wish to debug?"-dialog. From there you can attach to the program which embeds your control.
--
Booohoo!
|
|
|
|
|
Aha, I didn't know I could do that from an ActiveX control as well. Thanks!
|
|
|
|
|
Or set the tstcon32 as the executable for the debugsession.
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
It keeps getting better Thanks!
|
|
|
|
|
I have an MFC Extension-DLL which includse various controls I'd like to use in various places.
When I use it in MFC applications it works.
When I use it in ATL-Dlls it works, the wizard replaces several core methods in the Dll (DllCanUnload, etc) create a CWinApp object and all is well.
It seems like I can't use my beloved MFC-Extension-DLL in an ATL Executable project.
Excerpt:
Executable (EXE)
Select to create a local out-of-process server. This option does not allow support for MFC or COM+ 1.0. It does not allow for the merging of proxy/stub code.
Why is this ?
Is there a way to get pass this limitation ?
|
|
|
|
|
Hi,
I was developing an ActiveX control that is to be embedded in IE. While trying to implement, I ran into this problem: I thought capturing the WM_DROPFILES message should be sufficient for providing drag and drop support of files (from file explorer) to the ActiveX control. While this works if the control is embedded in a thick client (say a VB form), it doesn't work when the control is embedded inside IE. IE's default handling of dropped files kicks in and it tries to open the file!
I tried to look for help from the usual sources (MSDN, google etc) but most of them deal with MFC drag and drop support while I am using ATL and can't use any of those. Any help here would be greatly appreciated!
Thanks,
KR Nathan
|
|
|
|
|
Hi
To have drop capabilities, a control must implement IDropTarget interface and regiter itself as a drop target using the RegisterDragDrop function.
Fabian
|
|
|
|
|
Thanks for this info. However, looking at the IDropTarget, it looks like much more sophisticated than what I require. When files are dragged from explorer and dropped, I just need to know the filenames of the dropped files so that I can show them in a list inside my control. WM_DROPFILES does exactly same but doesn't seem to be working when the control is placed inside IE.
Thanks for your help.
|
|
|
|
|
Hi,
I have created a ATL component in a MFC application with Add Class wizard. Now i will instantiate an object from this component in a thread, and i have included component header file in that thread's .cpp file however the compiler generate error for unknown IID and i do not know which file must be included that solve my problem?
Alireza
|
|
|
|
|
Hi
I am a beginer VC++ programmer. I have a question:
What is ATL and how can use its.
Are you know the meaning of "MARZOGH"?
If YES,Please send for me.
|
|
|
|
|
i am in need of a good tutorial on installscript,working with scripts,extensibility, custom dialogs for working on
dev studio 9 on a installshield project.
But on web it seems no good tutorials are available.everything points to books from installshield.com
Advise.
Thanks
Suman ray
|
|
|
|
|
I need to be autentificated by a server before I can download a file from this site. I dont know how.
The server adress that auentificate me is like this:
http://www.xxxx.com/user=xx&psw=xx
when my browser gets to this url is redirected to other page that give me the links to the files I want to downlaod.
Im trying to use the method URLDownloadToFile to get this files, but I need to autentificate my self first and I dont know how, can some body help me plz tks.
|
|
|
|
|
Hi all,
I have to pass a safearray to my DLL COM server. the method must size the array, and then fill with data. After that the client must use the data the server has inserted. I suspect my passed array is a copy of the one sent by the VB client, so my VB client does not access the data. how I have to modify my MIDL lines in order to have the safearray shared?
I am using:
[id(1), helpstring("method GetPosition")] HRESULT GetPosition(VARIANT arrayPosition);
arrayPosition is a vector of double like this:
Dim arrayPosition as Double (0 to 9)
Dim a As New RunTimeAx
a.GetPosition arrayPosition
Debug.Print arrayPosition (0)
Debug.Print arrayPosition (1)
Debug.Print arrayPosition (2)
Debug.Print arrayPosition (3)
Could you pls help me?
Thanx in advance
|
|
|
|
|
You probably want
HRESULT GetPosition([in, out] VARIANT* pArrayPosition); or even, if the caller won't ever pass anything interesting in:
HRESULT GetPosition([out, retval] VARIANT* pArrayPosition); In the second case, you would transform your VB code to
Dim arrayPosition As Variant
Dim a As New RunTimeAx
arrayPosition = a.GetPosition
Debug.Print arrayPosition (0)
' etc (You might need to use Set , I haven't used VB for a while).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanx a lot Mike,
when you come in Italy I'll offer you a beer.
Thanx again.
|
|
|
|
|
Consider the following code.
Consider the following code
byte[] message = new byte[40];
message[4] = (byte)'S';
message[5] = (byte)'S';
message[6] = (byte)'T';
message[7] = (byte)'A';
message[8] = (byte)'R';
message[9] = (byte)'T';
message[10] = (byte)'C';
message[11] = (byte)'S';
int retval = myStream1.Write(message);
This code is a C# code myStream1 is an object of a COM component, What would be equivalent code in VC++,
Byte seems like cannot be a bstr datatype in VC++.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
int retval;<br />
HRESULT hr = myStream->Write(CComBSTR(L"SSTARTCS"), &retval); or
hr = myStream->Write(_bstr_t(L"SSTARTCS"), &retval); depending on if you are using ATL or MFC prior to VS.NET/ATL7 (CComBSTR was an exclusive ATL thing in ATL3).
Mr.Prakash wrote:
Byte seems like cannot be a bstr datatype in VC++.
I'm not a .NET rocket scientist, but you are doing to that poor COM object seems to be dangerous. A BSTR string is a length descriptor followed by a sequence of characters. I thought .NET marshalled .NET strings as BSTR strings automatically between .NET and COM...? Why not just stuff an ordinary string into Write()?
--
Booohoo!
|
|
|
|
|
Click[^]
I figured out that byte[] array from C# is not a BSTR in COM.
No i am not even a Car scientist of C#
|
|
|
|
|
Hi all,
I made my first ATL w/ Visual C++ 6.0 project and it (almost) perfectly works in Debug Config, when I try to compile in Release MinDependecy I get the following link error:
inking...
Creating library ReleaseMinDependency/cnitfc.lib and object ReleaseMinDependency/cnitfc.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinDependency/cnitfc.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
What's goin'on?
Please help me.
thanx a lot.
Regards,
Andrea
|
|
|
|
|
Remove '_ATL_MIN_CRT' from the list of pre-processor defines. You've used part of the C run-time library that pulls in the initialisation part of the library. This looks for _main, which isn't defined if _ATL_MIN_CRT is defined.
HTH
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|