|
Thanks Stuart for the reply.
Yes, Fire_xxx() events work correctly as long as they are called in the correct context.
BTW, I am trying out my good old GIT solution -- only this time I am going to store the sink interfaces in GIT and store the cookie in my vector...I am currently putting together a custom IConnectionPointImpl<> to store/retrieve things properly with out breaking anything;
Will update you how it goes...
|
|
|
|
|
The other suggestion I was going to make (but didn't get around to) was to start a long-running thread and use the event idea I first proposed within that thread.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Custom implementation of IConnectionPointImpl<> to make use of GIT worked like a charm!
I'd seriously advise anyone stuck in a similar situation to try out this trick -- do let me know if you need my implementation (I think it shouldnt be a problem sharing my code, as it doesnt have any project specific details in it!)
Thanks Stuart for your replies.
|
|
|
|
|
Hint, hint - article -hint, hint.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Much larger than just a hint. I, for one, have been fighting problems like this for a while now and would love to look at a different view than my own for a change.
|
|
|
|
|
Yes I am still supporting VC6 in this project and it has to be cross platform.
Buried in the VC6 MSDN Library under “locale::facet ” is the line
“locale loc(locale::classic(), new myfac); ”.
Which is correct for latter versions of the MS STL, but there is no locale constructor that takes a locale and a facet defined in the VC6 STL version of locale.
My unsatisfactory workaround is:
#ifdef _ADDFAC // Dinkumware macro
std::locale myLoc = std::_ADDFAC(std::locale::classic(), new my_codecvt);
#else
std::locale myLoc = std::locale(std::locale::classic(), new my_codecvt);
#endif
Do you have a better one?
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I'm sure this is teaching grandma to suck eggs, but the only thing I'd suggest is to encapsulate that in another function, so you only need to do it once, i.e:
template<class Facet>
std::locale AddFacet(std::locale const& l, const Facet* f)
{
#ifdef _ADDFAC // Dinkumware macro
return std::_ADDFAC(std::locale::classic(), new my_codecvt);
#else
return std::locale(std::locale::classic(), new my_codecvt);
#endif
}
Alternatively, use this:
#ifndef _ADDFAC // Dinkumware macro
#define _ADDFAC (std::locale)
#endif
and use _ADDFAC for all platforms.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello,
I want to hide standard toolbar button of IE. i can hide IE std .toolbar , but affetcs my othere toolbar also. So is there any way to hide only Standard Toolbar button of IE.
thanks
Am
|
|
|
|
|
Is it possible to have a 32bit client initialize/invoke methods in a 64bit local COM server? If yes, how do I set up the Proxy/stub DLLs? The target OS I have in mind is Vista64 or Win7-64 (so the 32bit client will be running from with in WOW64).
Also, can I go ahead with ATL 8 for implementing the above scenario? Any examples available online? Thanks.
|
|
|
|
|
One more req I have to worry abt: The 64bit local server should be able to implement connection points (32bit client being the sink)...is this possible? Thanks.
|
|
|
|
|
This thread[^] documents the opposite scenario (64-bit client, 32-bit server) - does that enlighten the situation at all?
And this thread[^] indicates that 32-bit client and 64-bit client should be OK.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks Stuart for the pointers. Looks like all I need to do is to build/register both 32bit and 64bit proxy/stubs. Is that right?
In this case, can I also make the 32bit code act as a sink? Thanks.
|
|
|
|
|
Ummmm - yes, no, maybe - I really don't know
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I did a quick check using ATLDUCK sample. Built the atlduck (local com server) in to 64bit, tried connecting to it from duck (32bit). CoCreateInstance worked perfectly, but when duck tried an Advise() to atlduck, it crashed with an error msg "runtime terminated the app" ... trying out some more experiments, will update on the results.
|
|
|
|
|
Pk, I am stuck with the error - "duck.exe - An application has requested the Runtime to terminate it in an unusual way". This error comes up whenever the client tries to do an Advise(). I remember seeing this issue in XP (during the VS.NET 2002 days) by installing an hotfix...but, my current testbed is Win7-64..any ideas why this error is coming?
BTW, are there any samples available that do this kind of 32 => 64 => 32bit calls/event_triggers? I am not able to find any (or prob I miss the key words in my search! )...Thanks.
|
|
|
|
|
I have got it working. The error was because of me registering a 32bit server stub (my bad!!)...thanks.
|
|
|
|
|
Nice, well done.
Maybe a short article on the subject would be useful, to help out other people facing the same issue?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
sure will do, once I am done with my current legacy => 64bit port. Thanks.
|
|
|
|
|
Hi,
We have one library which is implemented by using STLPort.There is one application which wants to use this library and this application is using microsift STL.
Is there any way by which we can use both microsoft STL and STLPort in same project?
Thanks and Regards,
Vishal Soni
|
|
|
|
|
IIRC, STLPort doesn't use namespace std - it uses something like _STL and uses a macro (#define std _STLPORT ) to make that look like std in the code that uses STLPort.
You (obviously) need to make that distinction more explicit - I suspect you might be able to get your system to work by getting creative with macros.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks Stuart.
But before going in to this step,I am getting one more porblem.
I am trying to compile my library with "Visual studio 8" first time and it is giving some errors
related to stlport.I found the reason on net that current version of STLport on my system is not compatible with VC++ 8.0 version.
I tried to take the latest version from STLport.org but I am not finding the way by which I can build
stlport library from it.
Could you please help me?
Thanks and Regards,
Vishal soni
|
|
|
|
|
Version 5.2.1?
Downloading it and unpacking it reveals a configure.bat file, which you'll use to tell it what options to build into STLport. That builds a makefile which (as the configure script tells you) you use by going to build/lib folder and type "nmake clean install" to build and install STLport to the "lib" and "bin" folders.
Seems simple enough to me...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: Seems simple enough to me...
LMAO Thanks, get's my '5'
|
|
|
|
|
I am trying same but if I give the command "nmake clean install", then it gives
the error unknown command
After this I tried by giving command
"C:\Program Files\Microsoft Visual Studio 8\VC\bin\nmake" clean install
By this I am getting the error
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Pleas tell that where I am wrong.
|
|
|
|
|