| | |
How to access LPTSTR data in VB
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 7
Reputation:
Solved Threads: 0
Hi
currently working on a vb program to access a LPTSTR data in a VC coded function.
My vb program cannot get the string data
my sample code
Some information on the VC function
currently working on a vb program to access a LPTSTR data in a VC coded function.
My vb program cannot get the string data
my sample code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Declare Function GetMainWork Lib "LibDWM.dll" (ByVal lpszWNo As String) As Long 'I've tried 'Declare Function GetMainWork Lib "LibDWM.dll" (ByRef lpszWNo As String) As Long ->doesn't work Private Sub cmdClick() Dim lret As Long Dim sdat As String Dim ss As String sdat = "" ss = StrPtr(sdat) 'lret = GetMainWork(StrPtr(ss))->doesn't work lret = GetMainWork(sdat) ... End Sub
Some information on the VC function
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
int GetMainWork(LPTSTR lpszWNo); int GetMainWork(LPTSTR lpszWNo) { int retval = 0; ... sprintf(lpszWNo, "%s",lpMemDat->wnam) ; ... return retval; }
![]() |
Similar Threads
- Direct Sound Help (Creating a sound buffer) (C)
- From chester Heres all the code. Sorry but I just encluded the code in here (Database Design)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Transferring variables across forms in VB6
- Next Thread: Making a Terminate & Stay Resident (TSR) program in vb6.0
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





