Click here to Skip to main content
15,915,501 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalaccessing ini files Pin
r i s h a b h s7-Jan-03 18:28
r i s h a b h s7-Jan-03 18:28 
GeneralRe: accessing ini files Pin
Nick Seng7-Jan-03 20:07
Nick Seng7-Jan-03 20:07 
GeneralRe: accessing ini files Pin
r i s h a b h s7-Jan-03 23:23
r i s h a b h s7-Jan-03 23:23 
GeneralRe: accessing ini files Pin
Jerome Conus7-Jan-03 20:44
Jerome Conus7-Jan-03 20:44 
Generalpadding a string Pin
ns7-Jan-03 8:48
ns7-Jan-03 8:48 
GeneralRe: padding a string Pin
Hesham Amin8-Jan-03 11:28
Hesham Amin8-Jan-03 11:28 
GeneralRe: padding a string Pin
ns9-Jan-03 4:58
ns9-Jan-03 4:58 
Generalpassing a string array to a C dll Pin
ns7-Jan-03 4:21
ns7-Jan-03 4:21 
Heres the synopsis:

Heres my problem:

FRom the VB I am sending:

Dim MyString(0 To 2) As String 
MyString(0) = "a                          "
MyString(1) = "aaaa"
MyString(2) = "mmmm"
Call MyCString(MyString(0)) //I want to send in the address of the array MyString which is what I think I'm doing because:


// If I had an array of ints called IntAr[0 to 5] in VB then sending in IntAR[0] means sending in the address of the array I have gathered.

============================

where:
Public Declare Sub MyCString Lib "MyProj.dll" _
Alias "?MyCString@@YGXPAD@Z" (ByVal invar As String)


==========
and in the C dll:
__declspec( dllexport ) void MyCString(char * invar)
{
strcpy(invar+4, "From The C Code"); // Leave first 4 characters alone & replace the rest 
return;
}



This makes the value of MySTring(0) = "a From The C Code" in VB because the dll did : strcpy(invar+4, "From The C Code");

But how do I change MySTring(1)in the dll ?
Thx,
ns


Appreciate your help,
ns
GeneralRe: passing a string array to a C dll Pin
Nick Parker7-Jan-03 4:58
protectorNick Parker7-Jan-03 4:58 
Questionhow to assign variable Pin
Nashes6-Jan-03 18:46
Nashes6-Jan-03 18:46 
AnswerRe: how to assign variable Pin
Nick Seng7-Jan-03 14:33
Nick Seng7-Jan-03 14:33 
GeneralAlternative to Timer object Pin
Ruca6-Jan-03 5:53
Ruca6-Jan-03 5:53 
GeneralRe: Alternative to Timer object Pin
Richard Deeming6-Jan-03 6:20
mveRichard Deeming6-Jan-03 6:20 
GeneralRe: Alternative to Timer object Pin
Ruca6-Jan-03 6:31
Ruca6-Jan-03 6:31 
GeneralUsing Web Services and XML Pin
Matt Philmon6-Jan-03 5:43
Matt Philmon6-Jan-03 5:43 
Generalextracting new autonumber from database Pin
mcm6-Jan-03 4:47
mcm6-Jan-03 4:47 
GeneralRe: extracting new autonumber from database Pin
Nick Seng6-Jan-03 14:17
Nick Seng6-Jan-03 14:17 
GeneralNeed help updating vb script Pin
NeedingHelp6-Jan-03 4:25
NeedingHelp6-Jan-03 4:25 
GeneralRe: Need help updating vb script Pin
Ray Cassick6-Jan-03 5:02
Ray Cassick6-Jan-03 5:02 
GeneralRe: Need help updating vb script Pin
NeedingHelp6-Jan-03 5:28
NeedingHelp6-Jan-03 5:28 
GeneralRe: Need help updating vb script Pin
Ray Cassick6-Jan-03 6:24
Ray Cassick6-Jan-03 6:24 
QuestionHow to get the short (DOS) version of a long filename? Pin
Matt Philmon3-Jan-03 3:14
Matt Philmon3-Jan-03 3:14 
AnswerRe: How to get the short (DOS) version of a long filename? Pin
iluha4-Jan-03 6:18
iluha4-Jan-03 6:18 
Generalcommand line parameters Pin
r i s h a b h s2-Jan-03 22:47
r i s h a b h s2-Jan-03 22:47 
GeneralRe: command line parameters Pin
Ray Cassick3-Jan-03 2:23
Ray Cassick3-Jan-03 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.