-
August 5th, 2002, 03:06 PM
#1
MFC in Visual Basic?
Hello, peoples.
I'm interested in accessing FTP through Visual Basic. One of my illustrious co-workers showed me a little program he wrote to perform FTP transfer using MFC in C++. It uses the CFtpConnection class. I said, "Well, that looks easy. Is there any way to do that in Visual Basic?"
And he says, "Oh yeah, you just declare it as a class with VB after it."
Now I wasn't going to totally believe that part of it, but I didn't know if accessing MFC classes in VB was possible, so I did some searches and found nothing so far.
Is there indeed a way to access the innards of an MFC class within Visual Basic?
Thank you for any help. And sorry if I sound green. I know I can access the win32 functions, but I'm not privy to the accessibility of MFC in VB.
-killRoy
-
August 5th, 2002, 03:46 PM
#2
In Delphi there is a very cool FTP component BUT VB doesn't have one. It should have one.
One solution is the following:
Create a dll in VC++ to be able to access an instance of that class. Add the functions you need to get the desired functionality. Be careful with the string handling in C++.
From VB you can access this dll.
-
August 5th, 2002, 04:25 PM
#3
Ew, not exactly a straight forward way of doing it. And not as straight-forward as was suggested to me.
Ok, thanks for the information!
-
August 5th, 2002, 05:09 PM
#4
Basically speaking KillRoy your talking about oil (VB) and water (C/C++ anything). They don't go together. Period. Sorry about that.
As far as the CFtpConnection class goes, it's great. I know, because I've used it many times.
Good luck with the DLL. This is the way I would do it.
David
If you are not what you say you are, then you are what you say you are not.
-
August 5th, 2002, 10:07 PM
#5
Actually if you search on either www.allapi.net or www.planetsourcecode.com, you'll find bunch of samples on FTP for VB This forum might have the links also. So search for it!
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|