|
Indeed, the cretin had change the TLB file's directory and the DLL remained linked to the old one.
Thank you for the reply
rechi
|
|
|
|
|
Hi,
I'm a novice in STL so my question is very easy.
I have the follows:
typedef multimap<uint, string=""> CLangMsg; // I need to have equal keys
next, I filled the multimap with data (key+value).
I searched in this map and want to get all values with the same keys.
How to do this?
Yours sincerely,
Alex Bash
|
|
|
|
|
Use equal_range to obtain iterators pointing to the range of elements you're interested in.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have defined an enum in IDL and use the import statement in my C++ client. The problem is that when I don't have any COM methods that use the enum directly the enum does not go into the tlh file. I want to pass the enum as a long so I can or several enums together. I guess I can use a type cast but I just wanted to know from the experts how this is done since I have almost no documentation on the subject.
John
|
|
|
|
|
Here's an enum that I did for an EXE server, maybe it'll give you a nudge in the right direction.
library CPWebSvcReaderLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[v1_enum] enum CPHrCodes
{
CPWEBSVC_S_INITIALIZING = 0x00040200,
CPWEBSVC_S_UPDATEINPROGRESS,
CPWEBSVC_S_OFFLINE_NODATA,
CPWEBSVC_S_OFFLINE_CACHEDDATA,
CPWEBSVC_E_NOTLOADED = 0x80040200
};
...
};
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Thanks Mike. I solved the problem by making a dummy method (returns E_NOTIMPL) that took my enum as a parameter then the enum ended up in the .tlh file and all was well...
John
|
|
|
|
|
Just put the enum inside the library block!
--
Run around in the radiation
Run around in the acid rain,
On a black, black planet
|
|
|
|
|
Thanks. I guess I should have better documentation but it is hard to find this kind of stuff in ATL manuals they seem all to spend 300 pages talking about threading models and very little on stuff like this...
John
|
|
|
|
|
It was kind of funny though. Michael had the solution for you in his post all along.. notice how his enum is in the library clause?
You need a book on IDL it seems. I'm gonna buy one or two soon, because I believe I only know the tip of the ice berg. Besides, I think it's good bedtime reading.
--
Run around in the radiation
Run around in the acid rain,
On a black, black planet
|
|
|
|
|
Jörgen Sigvardsson wrote:
notice how his enum is in the library clause?
I did not know that made a difference. I am very much a newbie when it comes to ATL or com.
Jörgen Sigvardsson wrote:
You need a book on IDL it seems.
I guess I do. I don't directly edit IDL files for the most part unless I want to change or add a parameter on a method.
John
|
|
|
|
|
Can I fire events in ATL so as to be consumed in internet explorer?
I want to send notifications to the IE, whenever a condition becomes true.
Is it possible to use ATL events for the purpose such that whenever the condition becomes true an event is fired by the DLL/Control, which can be captured in the IE
|
|
|
|
|
I have an SDI app.I put an CSplitterWindow in it and put a CListViewCtrl in the splitter window.My question is how to get those LVN_XXXXXXXXX notifications passed down to the main frame so that I can handle them.(the parent window of the list view is the splitter window).
And antoher question is that I added the LVS_EX_FULLROWSELECT style to the list view when I created it, but it doesn't work, why?
modified 1-May-21 21:01pm.
|
|
|
|
|
Look at the message map in CSplitterWindow , it contains FORWARD_NOTIFICATIONS() . That means essentially, "pass all unhandled WM_NOTIFY or WM_COMMAND messages to my parent". So when the list sends a LVN_xxx to its parent (the splitter), the splitter sends it to its parent (the main frame). So the answer is, you don't have to do anything. (BTW I'll be covering this topic in my WTL articles soon, probably part 7.)
Can't say about your 2nd question. Post some code.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
First thank you
but there are still some problems i met with
1.i find the NOTIFY_HANDLER ask for the id of the control, but my CListViewCtrl is a view. how can i handle these notifications?
2.look at this
http://www.codeproject.com/useritems/wtlsnapsplitter.asp[^]
it has a listbox,the author added the LVS_EX_FULLROWSELECT to it,but ...
see for yourself.
3.my intelisence doesn't recognize CSplitterWindow, why?
modified 1-May-21 21:01pm.
|
|
|
|
|
|
hello
i creat a vector in class named foufou vector< foufou * > fou_caracter; and in an other class i store in the vector a random position that i generat
by rand
void creatfoufou::creatfou(int amount)<br />
{<br />
foufou *newfoufouPtr;<br />
<br />
int speed,steer;<br />
<br />
for(int index=0;index<amount;index++)<br />
{<br />
<br />
<br />
ptrfoufou->initPosX =( ( 1 + rand( ) % 100 ) - 50 );<br />
ptrfoufou->initPosY =( ( 1 + rand( ) % 100 ) - 50 );<br />
ptrfoufou->initPosZ =( ( 1 + rand( ) % 100) - 50);<br />
<br />
newfoufouPtr = new foufou();<br />
fou_caracter.push_back( newfoufouPtr );<br />
<br />
<br />
<br />
<br />
}<br />
}<br />
<br />
and in an other function i want read the vector but i don't can
void creatfoufou::iteratorVector()<br />
{<br />
<br />
creatfou(5);<br />
int vectorIndex;<br />
vectorIndex = fou_caracter.size();<br />
<br />
for (int i=0;i<vectorIndex ;i++)<br />
{<br />
<br />
ptrfoufou->RePaint(<br />
fou_caracter[i]->initPosX,<br />
fou_caracter[i]->initPosY,<br />
fou_caracter[i]->initPosZ);<br />
}<br />
<br />
<br />
}
what is the error with this???
|
|
|
|
|
aguest wrote:
what is the error with this???
Use an iterator
vector<foufou*>::iterator myIter;
-Nick Parker
|
|
|
|
|
but how i can manipulat e thi siterator to read the vector.
thank you
|
|
|
|
|
aguest wrote:
but how i can manipulat e thi siterator to read the vector.
You don't have to use an iterator, here is an example of not, I guessed what you class might look like:
#include <iostream>
#include <vector>
using namespace std;
struct Stuff
{
int x, y, z;
};
int main()
{
vector<Stuff*> vect;
unsigned int index;
Stuff* si = new Stuff;
Stuff* si2 = new Stuff;
si->x = 2;
si->y = 4;
si->z = 6;
si2->x = 1;
si2->y = 3;
si2->z = 5;
vect.push_back(si);
vect.push_back(si2);
for(index = 0; index < vect.size(); index++)
{
cout << "X = " << vect[index]->x << endl;
cout << "Y = " << vect[index]->y << endl;
cout << "Z = " << vect[index]->z << "\n\n";
}
delete si;
delete si2;
return 0;
}
-Nick Parker
|
|
|
|
|
Used a VC++ ATL Wizard to build a COM DLL server and then add a simple ATL object inside, when this COM object is created in ASP, IIS complaint library not registered.
Try to create that object VB, no problem at all.
How to fix this problem?
|
|
|
|
|
Have you implemented IObjectSafetyImpl ?
B
|
|
|
|
|
You need to add a reference to a type library for your server in the file global.asa .
Like this:
<!-- METADATA TYPE="TypeLib" FILE="d:\path\to\typelib\or\server.dll" -->
I think that should help you.
--
Run around in the radiation
Run around in the acid rain,
On a black, black planet
|
|
|
|
|
I am not all that familiar with the STL so bear with me.
I need something that can hold a lot of information and
be resized fairly easily - I have thought of std::vector
for this purpose.
However, the data I am using is not int, double, long, etc...
Instead, it is a class, say for simplicity CString.
Is it possible to define:
<br />
vector<CString> StringStack;<br />
This compiles and I can seem to add "strings" to it
If so, how does one go about declaring and using an iterator for this?
Have tried:
<br />
vector<CString>::iterator itr;<br />
for (itr = StringStack.begin(); itr != StringStack.end(); ++itr)<br />
{<br />
cout << *itr;<br />
}<br />
But this doesn't seem to work. Is what I am attempting even possible?
Thanks.
|
|
|
|
|
Ok, I am guessing here. Does CString support iostreams? You might try using std::string.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I think I've got it.
I do need to overload << though.
|
|
|
|