Passing string from vb to dll
I''ve been developing my game as a VB app, with a C++ dll to handle the more ''intensive'' functions.
In the dll, I have:
void _stdcall LoadTerrain ( LPCSTR S)
...
ifstream is( S, ios::binary | ios::nocreate );
...
and in VB:
Public Declare Sub LoadTerrain Lib "Game.dll" (ByVal Filename As String)
fs = "C:\\game project\\background.bmp"
LoadTerrain fs
My problem is simply, it doesn''t open the file. If I hardcode the filename in the dll, it works, but trying to pass it from VB nothing happens.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement