Test.cpp
C:\Documents and Settings\Owner.LENOVO-52CEDA01\桌面\Test.cpp(23) : error C2664: 'readGAM60Value' : cannot convert parameter 1 from 'char [9]' to 'unsigned short ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
VB编写的DLL见附件。
程序代码:
#include <stdio.h>
// This is the path for your DLL.
// Make sure that you specify the exact path.
#import "d:\project1.dll" no_namespace
void main()
{
BSTR bstrDesc;
try
{
CoInitialize(NULL);
// Declare the Interface Pointer for your Visual Basic object. here,
// _Class1Ptr is the Smart pointer wrapper class representing the
// default interface of the Visual Basic object.
_Class1Ptr ptr;
// Create an instance of your Visual Basic object, here
// __uuidof(Class1) gets the CLSID of your Visual Basic object.