|
|
Ok, now I want to know what COM is!!
Or I just want to make it clear, my thought is that a COM -> OBJECT <- is a varible:
CAClass com; // COM object???
No, I don't think so...
What HOW do I make a COM object for example??
I don't realy know how it looks like! (
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Rickard Andersson wrote:
Or I just want to make it clear, my thought is that a COM -> OBJECT <- is a varible:
CAClass com; // COM object???
No, I don't think so...
VERY simplified:
<br />
class COMInterface<br />
{<br />
public:<br />
virtual method1 = 0;<br />
virtual method2 = 0;<br />
};<br />
<br />
class COMCoClass: public COMInterface<br />
{<br />
method1;<br />
method2;<br />
}<br />
<br />
int main(void)<br />
{<br />
...<br />
COMInterface* pInterface;<br />
...<br />
pInterface->method1;<br />
...<br />
}<br />
<br />
I vote pro drink
|
|
|
|
|
|
I have general question about COM developing in VB.
Does Visual Basic have something like ATL for COM developing(except ActiveX)?(I mean something like "simple object"in ATL)
VB doesn't have pointers ,so How does it implement interfaces,methods and another things in COM.
Are COMs that design in VB as strong as,as fast as or... COMs that in ATL have?
|
|
|
|
|
When you make a com object in something named VB, you not write the IDL. The interface is generated by the VB compiler...
In same mode is easy to write com objects in VB, but the problem is that you don't have the control like in ATL projects when you write the IDL file...
Best Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Everything in VB 4/5/6 is COM. If you create a new project as an ActiveX DLL or ActiveX EXE, you will have COM servers, and all you need to do is to fill in the methods you want. Everything else is done by the compiler.
However, COM servers created with VB depend on VB runtime, and they can never be lean and fast as ATL created.
I vote pro drink
|
|
|
|
|
Hi.
Is it easy to read from and write to the com port using C++? Is there a library for it?
Thanks,
Kuphryn
|
|
|
|
|
Try CreateFile or OpenFile API functions ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Okay. Thanks.
Felix posted a reply at Programmer's Heaven and mentioned functions:
inp();
and
outp();
http://www.programmersheaven.com/msgboard/read.asp?Board=3&MsgID=93124&Setting=A9999F0001
Those functions are from conio.h. What do you think about those functions?
Kuphryn
|
|
|
|
|
kuphryn wrote:
inp();
and
outp();
http://www.programmersheaven.com/msgboard/read.asp?Board=3&MsgID=93124&Setting=A9999F0001
Those functions are from conio.h. What do you think about those functions?
They are old and you are probably better of using a modern class-library or perhaps an Active-X component like GreenLeaf CommX. I am in no way connected to Green Leaf but I have successfully used thier products for 10 years on all OS:es from DOS, OS/2 to Windows 3.11/95/NT/2000. Their site is at http://www.gleaf.com/
--
Mattias Wahlberg
IDNet
|
|
|
|
|
Hi,
Unfortunly, thease functions can't works on Win NT !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Hey.
I read Ramon de Klein's description of Serial library for C++. It sounds good.
PJ Naughter's class is a for MFC.
What is the difference between, say, Klein's class and Naughter's class?
What is the advantage of using MFC and not non-MFC?
Kuphryn
|
|
|
|
|
Okay. I appreciate it. Thanks everyone.
Kuphryn
|
|
|
|
|
C++ Style:
ifstream readCOM;
readCOM.open(com1, ios::in | ios::binary)
char *ptrStore;
try
{
ptrStore = new char[SIZE];
}
catch (bad_alloc error)
{
cerr << error.what();
exit(1);
}
readCOM.read(reinterpret_cast<char *=""> (ptrStore), SIZE);
How do you get the exact size of whatever you're reading from the COM port? It is not a measurable storage container.
Do I have to use an MFC class? What is the major difference if I were to use the ifstream and ofstream instead of an MFC class? I have no experience with MFC or windows programming.
Kuphryn
|
|
|
|
|
How can I use the "CInternetFile::Read()" or "CInternetFile::Write()" to copy a file from a FTP server to a local machine ?
Could anybody gives me some code sample ?
|
|
|
|
|
CInternetFile* pIntFile;
pIntFile
= ftpConn.OpenFile("MyFile.txt", GENERIC_WRITE, FTP_TRANSFER_TYPE_ASCII);
pIntFille->WriteString("My Data");
pIntFille->Flush();
.
.
pIntFile->Close();
Best Regards...
Chau, and good luck
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
hello
i want some help...
i have developed an application & used file open dlg box to select a specific file can u please tell me how to get version of that specific file in form of string....
thanking u
chanda.com
|
|
|
|
|
Hello every body,
I implemented a dialog base application, but sometime(when my
application swap), my dialog box do not refreshed itself after another window slides
on it.
Is anybody know how can i correct this problem?
Thanks for help.
S.
|
|
|
|
|
I hope I understood your problem correctly.
If you are doing a lenghty process in your application, you can write & call the following function in between the lenghty process, so that the window getts refreshed.
void ProcessMessage()
{
MSG msg;
if(::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}
However the best way to avoid these problems, I feel is by creating thread for the lenghty process.
Prashanth
|
|
|
|
|
please help how i prevent my vc++ appliaction to kill from taskmanager.if it not possible then i have senn application when i killed they again restart how.
Ibrar Ahmad
Softare Engr.
Comcept PVT LTD.
Islamabad
abrar_@yahoo.com
|
|
|
|
|
I had the same problem. For that I made a service, that test the applications that are running. If I detect that one application of my list is killed, I restart again, the application. didn't find another solution...
Best Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
u can solve it by writing a service and when u r processs is killed by os just create another instance...i think there is some other ways to prevent ur program in the hand of os..
just tr the first one
best luck..
renjith
|
|
|
|
|
Righty I have the source code to a MFC IRC client using the Document architecture....Mainframe() crap etc. I want to do the same thing but have it on a dialog app cos I hate the windowed based programs...here is the link:
http://www.vchelp.net/source/irc_class.zip
if someone can make this into a dialog based app I would be most appreciative and ill give them hosting, email address @ settlers.net...anything (bar my girlfriend )
Thanks
Ashley 'Ashman' Rowe
www.settlers.net
And no i cannot do it myself as i am incompetant
thanks
|
|
|
|