Wrox Programmer Forums
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 4th, 2004, 05:56 AM
Registered User
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling VB from C++

I read a very good article on how to call a VB dll from C++ at www.codeproject.com/com/vb_from_c.asp. But I'm having a few problems, so I thought I'd see if anybody out there knows where I'm going wrong, or if there's a better way to do it:

The steps I followed are as follows:
I have a VB dll.
I want to call classes and methods in the VB dll from C.
I registered the dll with regsvr32.
I used the OLE/COM object viewer to get the IDL for the dll.
I created a file oratrav.idl and pasted the text in.
I ran midl.exe as follows: midl c:\progra~1\micros~3\myprojects\oratraveller\oratr av.idl /h c:\progra~1\micros~3\myprojects\oratraveller\oratr av.h
But when I run MIDL, I get error MIDL2025, syntax error : expecting a type specification near "single".
Please can somebody explain to me where I'm going wrong?

(Also, please bear in mind that I am really an ANSI C programmer rather than MS Windows C++. Although I know what objects, instances and methods are, I'm easily lost when talking about Windows-platform-specific topics)

Thanks in advance


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling one VB.NET script from another kwilliams VB.NET 2 September 11th, 2006 06:26 AM
Calling a DTS Package from VB levinll Pro VB Databases 0 November 7th, 2005 04:09 PM
VB calling DB2 stored procedure sangsri VB How-To 1 July 13th, 2005 08:55 AM
Calling oracle packages from VB RGC Pro VB Databases 1 June 18th, 2004 02:16 AM
Calling a .Dll of Vb.NET enggalok C++ Programming 0 March 1st, 2004 06:51 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.