|
Hi all,
I'm having trouble getting information on how to enumerate a folder that I created. My folder is under the "System" directory, and I want to display the contents in a menu (much like the "Send To" menu). I found the "Navigating the Namespace" article on MSDN, but but that just finds the "first" folder to enumerate.
I have a an IShellFolder interface pointed to the system folder:
hr = SHGetMalloc(&pMalloc);<br />
hr = SHGetFolderLocation(NULL, CSIDL_SYSTEM, NULL, NULL, &pidlSystem);<br />
hr = SHGetDesktopFolder(&psfDesktop);<br />
<br />
hr = psfDesktop->BindToObject(pidlSystem, NULL, IID_IShellFolder, (LPVOID *) &psfSystem);<br />
<br />
if (SUCCEEDED(hr))<br />
{<br />
hr = psfDesktop->QueryInterface(IID_IShellFolder, (LPVOID *) &psfSystem);<br />
psfDesktop->Release();<br />
}<br />
<br />
hr = psfSystem->EnumObjects(NULL, SHCONTF_FOLDERS, &ppenum);<br />
Now how can I get an this pointed to my folder? I'm familiar with IShellFolder::ParseDisplayName , but I just don't know how to implement this (if this is in fact what I need).
Could someone point me in the right direction?
Thanks,
Matt
|
|
|
|
|
In ATL, a .tlb file is generated automaticly for the component. But in a MFC-based component project, how can I create a .tlb file for it?
I want to become a great programmer just like most of you. But I still have a long way to go, can you help me? Of course, I will be very glad to help some of you, if I can.
|
|
|
|
|
How was your component created? Did you use one of the wizard options?
I have test both an MFC ActiveX control and MFC Application with COM Server support and both generated the expected tlb file in the debug folder?
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
The IDispatch interface is useful sometime. But I can't find a sample that use more than one IDispatch-derived interface in one MFC-based component. Can't we use more than one in MFC? How can I use more than one IDispatch-derived interface in one component just like in ATL?
I want to become a great programmer just like most of you. But I still have a long way to go, can you help me? Of course, I will be very glad to help some of you, if I can.
|
|
|
|
|
Hi
I issued this problem recenty but now I know a bit more about its nature.
I'm trying to store some data in MsOffice files and the problem is that MsWord 2000/XP removes my data after I save document from the Word (I tried also MsWord 97,MsExcel 97/2000/XP and here my data remains untouched). Now some explanation how I store my data in doc file:
1. Using StgOpenStorage I open office file as a compound file
2. I create new storage with IStorage::CreateStorage
3. Within newly created storage I create new stream using IStorage::CreateStream
4. I store my data within newly created stream using IStream::Write
5. I release all opened streams and storages
I discovered that when in doc file Word adds stream 0Table (1Table is probably always present) my data doesn't dissapear (I don't know why). I don't know how to prevent Word from deleting my data but I suppose that forcing Word to add 0Table stream could solve my problem (but how can I do this). I would appreciate any hints.
Mariusz Popiolek
|
|
|
|
|
Using Access 2000 and ADO VC++6.0
I am executing the following statement..
VARIANT Params[2];
Params[0].vt = VT_I2; Params[0].iVal = 1;
Params[1].vt = VT_R4; Params[1].fltVal = 8.99;
m_pCommand->adCmdText = "Query4";
m_pCommand->ActiveConnection = m_pConnection;
m_pCommand->Execute(0, Params, adCmdStoredProc);
Generates an exception {DB_E_PARAMNOTOPTIONAL}
Query4 in Access is as follows:
PARAMETERS vID Short, Rad IEEESingle;
INSERT INTO TABLE1 ( ODID, MeasRadius )
VALUES (vID, Rad);
Thanks for your help in advance.
|
|
|
|
|
I have around 500 records to insert into a table in Access 2000. I am using ADO.
Is it possible to pass all of the 500 records to a query using some kind of SafeArray parameters and Insert them all at once?
Any tips how this can be accomplished ?
Thanks
|
|
|
|
|
I need to open MSWord, retrieve information from it, change some information, and then save it. All these will be done using VC++/MFC. Does anybody have some existing code which I can take a look at it?
|
|
|
|
|
hello,
I need your input/advice on a practical (and urgent) problem!
I am currently developping a time critical app on a Windows NT/2000 platform involving pseudo real-time image acquisition.
The app should be flexible, fast and implement some fault-tolerant features. For example, I want to handle 12 cameras "simultaneously" (multitasks) for an acquisition. One channel acquition task may crash. But the whole application (the remaining working channels) should NOT crash! So I thought of using different processes for each channels.
The next question was then: how do I handle (share?) huge chunk of data (512*512 RGB images), among a pool of processes under Windows NT?
Of course, an obvious solution would be to use either PIPES or SHARED MEMORY (using FileMapping). But lots of coding is necessary and I will end up with a LOT of bugs (and I must have NO MEMORY LEAKS at all, it's imperative!!).
I discovered COM, a standard way of doing what I want, but I was wondering how you transfer BIG CHUNKS of data between COM servers???
What should I use to have something efficient, but also flexible in terms of development?
Please just give me some clues!
Thanks!
Bertrand Boichon
Research Assistant
Electrical & Computer Engr
Oregon State University
|
|
|
|
|
as long as all your modules will be located on the same machine, you can just pass HGLOBAL memory handles to and from COM objects. i do it all the time.
-c
No matter how fast light travels it finds the darkness has always got there first, and is waiting for it.
-- Terry Pratchett,
|
|
|
|
|
Hi
I succesfully added new storage into MSWord compound file (and new stream inside this new storage), but the problem is that when I open this doc in MSWord, made some change and save doc, my storage and stream dissapears. I saw application that adds stream(in root storage) which is "word saving proof" but I don't know how to do this. I also encountered strange thing: when I have word doc with stream added by this application, storage and stream added by me doesn't dissapear. I don't know why this happens. Anyone have some idea how to prevent new streams and storages from deleting by Word? Thanks in advance for any hints.
Greetings
Mariusz Popiolek
|
|
|
|
|
Hi All,
I need to know the reason why the function AddRef returns a long integer?
Could somebody explain me?
|
|
|
|
|
From "Platform SDK : COM"
IUnknown::AddRef
The IUnknown::AddRef method increments the reference count for an interface on an object. It should be called for every new copy of a pointer to an interface on a given object.
ULONG AddRef(void);
Return Value
Returns an integer from 1 to n, the value of the new reference count. This information is meant to be used for diagnostic/testing purposes only, because, in certain situations, the value may be unstable.
I hope that helps.
Iain.
|
|
|
|
|
I recently accepted a project that involves writing a COM component that will be used from a Java program. Does anyone have any suggestions or links about a Java2COM bridge or examples?
With best regards,
Daniel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
|
The project I am involved with at work is using the jintegra product to do just this, not sure what your requirements are but it is working at our level, which is a ~30 engineer project, running for 1 year so far. There are few 'gotchas' relating to things like type conversions and function overloading. Our prototyping effort/trial to get up to speed was about 1 engineer for 6 weeks.
see:
http://www.linar.com/
David
|
|
|
|
|
How in the world can i get this to work
if i use IXMLDOMNode in the idl it compiles
if i use the using namespace in the c++ code i'm still good
however the headers created from the idl result in the following:
error C2872: 'IXMLDOMNode' : ambiguous symbol
Help!
|
|
|
|
|
|
I have been coding C++ for a while with ATL 3.0 and 7.0. However I cannot figure out how to access the IE com object view ATL 7. Does anyone know a good resource on this as I need to manipulate settings in the browser dynamically with a COM object. The MS Reference Library is no longer available and who knows what they will replace it with.
|
|
|
|
|
ATL has nothing to do with IE.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
|
I have an existing MFC application to which I added some ATL objects. Everything seems to work fine, except that it appears MIDL has changed property names of 'Count', 'Address', and 'Date', to 'count', 'address', and 'date' in the generated type library. Properties with other names are handled OK.
I can create a whole new ATL project from scratch and use these property names with no problem. It seems to fail only with these 'afterthought' objects.
|
|
|
|
|
It seems to me that your IDL-file contains the 'count' word as well.
For example,
[id(1)] HRESULT Test([in] IDispatch* count);<br />
<br />
[id(2),propget] HRESULT Count([out, retval] double *pVal);<br />
[id(2),propput] HRESULT Count([in] double newVal);
With best wishes,
Vita
|
|
|
|
|
IMHO, it is happened because a TLB has only one copy of words which are similar, but differ only by uppercase or lowercase letters.
With best wishes,
Vita
|
|
|
|