|
Is it possible to have developer studio regenerate my activeX control wrappers, after I make changes to them (add properties and events), short of totally removing the controls from your project and then reinserting them? I am writing the controls using ATL (beginner) and my projects are MFC based. The generated code says the following comment:
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
// Dispatch interfaces referenced by this interface
Thanks in Advance,
John
|
|
|
|
|
Hi all,
I would like to know how to create an IM like application? How does an Instant Messenger work? What should I be reading (and where)? I would like you to share your ideas with me.
TIA,
Hush..Hush.. thought I heard you calling my name now...
|
|
|
|
|
To build a simple messenger system, you basically need to program a server and a client (like the IM that you download and install)
The server is listening for messages from the clients. When it receives a message from a client, it forwards it to the right client. The clients listen for messages from the server, when they receive them they alert the user.
It's not that hard to build a simple message system in for example Visual Basic or Delphi, what you have to learn is how to use network sockets. I would recommend you to buy a good book on it, usually you can get enough code from it to create a basic message application.
/_henrik
Henrik Sternberg, Consultant
Cambridge Technolgy Partners, Germany
www.ctp.com/ce
henrik.sternberg@ctp.nospam.com
(take away nospam)
|
|
|
|
|
Thanks a lot.
Also,I'd like to how to build an IM application in VC++/ATL/COM. Could you give me some ideas about how to implement this?
TIA.
Hush..Hush.. thought I heard you calling my name now...
|
|
|
|
|
have you thought about using a XML based application or using some MAPI session?
|
|
|
|
|
Hi All,
How can I create an array of BSTRs??? is the following correct?:
BSTR mybstr[] (of course preceeded by size_is and so on...)
And how woukd I have and [in] and an [out] parameter iof this sort???
If this is isn't possible then I guess a SAFERRAY which contains BSTRs is the solution right?? or not???
Help me please!!!!
Thanks a lot!!!!
Alberto Gattegno
Software Engineer
http://www.itginc.com
|
|
|
|
|
In my opinion a safe way to do this kind of operation is using a SafeArray.
vector<string>MyFileNameList__ ;
SAFEARRAY*BSTRSafeArray = SafeArrayCreateVector(VT_BSTR, 0, FileNameList__.size());
for (unsigned int index = 0 ; index < FileNameList__.size(); index++)
{
BSTR m_result = MyAnsiCtoBSTRFunct (FileNameList__[indx]) ;
reinterpret_cast<bstr*>(BSTRSafeArray->pvData)[index] = m_result ;
}
then if you want you can push it in a VARIANT struct
VARIANT *MYfileList ;
MYfileList->vt = (VT_BSTR | VT_ARRAY);
MYfileList->parray = const_cast<safearray*>(BSTRSafeArray);
Francesco Mattioli Software Developer francesco.mattioli@cedac.com
|
|
|
|
|
correction
vector<string> bla..bla..bla
|
|
|
|
|
My employer has at last acknowledged the need for COM/DCOM skills within the company
Unfortuantely only to the level of letting me buy a book
Can anyone reccommend a single book for getting started with COM/DCOM. The book needs to be gentle enough to introduce a COM novice, but advanced enough to be a useful reference manual for when I actually start using COM/DCOM.
|
|
|
|
|
Better visit www.wrox.com
I find wrox book on com/dcom very useful
I will recommend u start with the book
Beginning ATL 3 COM Programming by Richard Grimes if u r a C++ programmer
Shahid Munshi
|
|
|
|
|
Better visit www.wrox.com
I find wrox book on com/dcom very useful
I will recommend u start with the book
Beginning ATL 3 COM Programming by Richard Grimes if u r a C++ programmer
Shahid Munshi
|
|
|
|
|
Thanks for your suggestion. Any particular reasons for your reccomendation. I have read several adverse comments about this book?
|
|
|
|
|
Hey there,
Ooh, I'm hard-pressed to come up with a -single- book that suits your needs, but I'll go just a bit out on a limb and suggest _Inside_COM_, by Dale Rogerson. This book is, for me, the best introductory book on COM, and it was the -only- book I used for years (until I started writing my own itty-bitty COM ports to non-MS platforms). For learning COM, I can't reccomend the book too strongly, because it's both a very concise and easy-to-understand book on the fundamentals, and it covers the true goings-on at the binary level, rather than just glossing over those details: D.R. has a great way of describing these fundamentals in such a way that it all seems quite easy to implement - and it doesn't take too much longer to "get it." (Yes, there was a lag between implmentation and "getting it," but this seems to be the MO with COM developers.)
But, there's two major caveats. First, Rogerson devotes few pages in _Inside Com_ to DCOM. Basically, he covers pretty-much just the minimal to code and use COM objects over a remote network using DCOM, but that's about it. Actually, I haven't used DCOM, so he may cover it to as big an extent as necessary, but I somehow doubt it. Second, if you're going to be coding in Visual Basic or Java, or just building "turnkey" ATL COM objects, then Rogerson's book is probably too low-level: given the constraint of one book, I'd probably try find one that more focuses on the COM Wizards and such....
But, all that being said, _Inside_COM_ is a great book with which to get started - and you'll probably come to the reasonable conclusion that "one book for all COM" probably isn't the way to go (didn't the Bible have over ~30 books?). If that hits you, then I'd quickly run out and get Don Box's _Essential_COM_. Don Box is the Johnny Appleseed of COM technology, and his book can help grow your understanding of COM by leaps and bounds. In many ways, Box takes off where Rogerson stops: he focuses more on the distributed aspects of COM, as well as optimized coding strategies that may lead to higher performance software.
Finally, the web is also a great source of COM info - you can't miss wonderful articles like The COM Programmer's Cookbook, and Smart Pointers Considered More Harmful (or whatever it is called). These papers, and many more, are available on the web - and at the right price (free).
Hope this helps.
-andrew
|
|
|
|
|
Thanks very much for your help
|
|
|
|
|
Hi all,
I want to make a COM server that can be used with Power Builder.
Does anyone know if it is ok to have my interface inherited oly from IUnknown or do I need to inherit it from IDispatch???
In other words how does powerbuilder bind to a COM object.
Thanks a lot.
Please mail me as well...
Alberto Gattegno
Software Engineer
http://www.itginc.com
|
|
|
|
|
Hi,
I am desiging an ActiveX control.
It is working fine when it is placed in the word document.
But if user selects "design mode" , which is there in the MSWord,
the control is getting selected and when he double clicking on it,
it is going to VBScript mode.
This behaviour should not be there for my control.
-anil krishna
|
|
|
|
|
hi,dear all
Without using #import in the source code of client side , I want to get the interface point from the com server during the running of client .
For instance , through the menu operation , I locate the file which consists of the com-object .Then how can I get the interface point? The com-object does not implement the interface of IPersistFile.
Thanks a lot
|
|
|
|
|
Hello,
An ATL component control(intended to work with Excel and Word) is working in Win 95/98 but not working in WinNT. when i tried to debug it, control is not coming into the program even into the OnDraw(),even MessageBox() is not getting displayed with Excel. but it's working fine with Word. Please help me
Thankx in Advance
|
|
|
|
|
I think we need more information to be able to help,
What kind of control is it? Which option of the ATL wizard did you use? What version of ATL? Does the project include MFC? Which version of Visual studio?
When you debug the control, what line of code does it fail on? Is there an error code?
What version of Excel and Word ?
Does the control work in the ActiveX control test container?
Michael
|
|
|
|
|
Hi,
MFC ,is not included and ATL 3.0 and VC++ 6.0.
I think it(Excel ) is not recoginizing it as a control, and it is showing only the control image.
any help?
thanks.
-anil krishna
|
|
|
|
|
Hi,
MFC ,is not included and ATL 3.0 and VC++ 6.0.
I think it(Excel ) is not recoginizing it as a control, and it is showing only the control image.
any help?
thanks.
-dhanush
|
|
|
|
|
Hi Michael,
Thaks for responding.It didn't include MFC,it's ATL 3.0 full control, Wizard options default and VC++ 6.0. Behaving in the same manner for both Word/Excel 97, i.e. fine with word but failing with Excel. I think it(Excel ) is not recoginizing it as a control, and it is showing only the control image.
any help, urgent plz?
thanks.
-dhanush
|
|
|
|
|
Have you tried debugging the control through visual studio when it is embedded in Excel. What does it fail on in the code?
Does it fail on all Windows 2000 machines or just one?
Michael
|
|
|
|
|
hi michael, thank u for u r response
I tried to debug in VC++ IDE, but the control is not coming into the code.Yes, it's failed on some combinations like WinNT 4 + Excel 97/2K. It's displaying the control content(which some image), but it's not responding to the events on it like mouse clicks even the messageboxes that i placed in OnDraw() & control's constructor are not prompted. As i think Excel is not recognizing it as a control, but why it's so i don't know if u can plz help.
lastly is there any diff between containment behavior of word and Excel, because the same control is working in all Word Versions.
Thanx in advance hoping that u will respond.
|
|
|
|
|
I've developed ActiveX Dll in VB6. Now I am trying to use it as DCOM server in win2000. Client machine is WinNT. DCOM population for .DLL is made by Windows 2000 'COMPONENT SERVICES' administrative tool. While running VB client application in remote WinNT system I get 'Run-time error (800401fd): Automation error Object is not connected to server'. If anybody knows solution for this problem, please write. Thank you in advance.
|
|
|
|