GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Mar-2005, 21:15
uman uman is offline
New Member
 
Join Date: Mar 2005
Posts: 2
uman is on a distinguished road

HELP ME! How do I pass an array of strings from VB to C++?


Hi, why does'nt this code work?
VB / Visual Basic Code:
Public Class Form1
    Inherits System.Windows.Forms.Form
    Private Declare Function startFunction Lib "..\..\scenefile_concat\debug\scenefile_concat.dll" (ByVal argc As Int32, ByRef argv() As String, ByVal dest As String) As Int32
--windows form designer generated code--
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim argv(3) As String
        Dim argc As Int32
        argc = 3

        argv(0) = "C:\bunkspeed\content\scenes\demoordie.scn"
        argv(1) = "C:\bunkspeed\content\scenes\dome.scn"
        argv(2) = "C:\bunkspeed\content\scenes\presentationscene.scn"

        Call startFunction(argc, argv, "C:\testscn.scn")



    End Sub
End Class
Last edited by LuciWiz : 26-Mar-2006 at 11:04. Reason: Please insert your Visual Basic code between [vb] & [/vb] tags
  #2  
Old 01-Mar-2005, 21:38
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
Might be better off posting it in MFC!
__________________
spasms!!!
  #3  
Old 01-Mar-2005, 21:41
uman uman is offline
New Member
 
Join Date: Mar 2005
Posts: 2
uman is on a distinguished road
Quote:
Originally Posted by machinated
Might be better off posting it in MFC!
What? By the way this is the C++ function declaration:
CPP / C++ / C Code:
int _stdcall startFunction(int argc, char** argv, char* dest);
  #4  
Old 20-Mar-2005, 20:48
ubergeek ubergeek is offline
Regular Member
 
Join Date: Jan 2005
Posts: 775
ubergeek is a jewel in the roughubergeek is a jewel in the roughubergeek is a jewel in the rough
well i don't know if this is the problem, but \t is a tab character, so either uses forward slashes / or double backslashes \\ to avoid hard-to-spot bugs.
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
template comiling problems - need expert debugger! crq CPP / C++ Forum 1 01-Feb-2005 21:26
array of pointers to strings mirizar CPP / C++ Forum 5 21-Jan-2005 10:24
Function and Array (w/ reference variables) question brookeville CPP / C++ Forum 15 07-Dec-2004 01:11
Speed up C++ code about 3d array! Truong Son CPP / C++ Forum 0 16-Mar-2004 21:52

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:03.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.