Click here to Skip to main content
15,889,863 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to use LPCTSTR in VB6. Pin
Septimus Hedgehog12-Apr-13 7:43
Septimus Hedgehog12-Apr-13 7:43 
GeneralRe: How to use LPCTSTR in VB6. Pin
Eddy Vluggen12-Apr-13 8:06
professionalEddy Vluggen12-Apr-13 8:06 
GeneralRe: How to use LPCTSTR in VB6. Pin
Septimus Hedgehog12-Apr-13 8:30
Septimus Hedgehog12-Apr-13 8:30 
GeneralRe: How to use LPCTSTR in VB6. Pin
Eddy Vluggen12-Apr-13 8:42
professionalEddy Vluggen12-Apr-13 8:42 
AnswerRe: How to use LPCTSTR in VB6. Pin
Richard MacCutchan12-Apr-13 7:04
mveRichard MacCutchan12-Apr-13 7:04 
GeneralRe: How to use LPCTSTR in VB6. Pin
Septimus Hedgehog12-Apr-13 7:55
Septimus Hedgehog12-Apr-13 7:55 
GeneralRe: How to use LPCTSTR in VB6. Pin
Richard MacCutchan12-Apr-13 21:53
mveRichard MacCutchan12-Apr-13 21:53 
AnswerRe: How to use LPCTSTR in VB6. Pin
Dave Kreskowiak12-Apr-13 8:31
mveDave Kreskowiak12-Apr-13 8:31 
Internally, VB6 uses BSTR to represent a string. This is a structure consisting of:

1) an integer denoting string length without the terminating character,
2) the Unicode string data (usually 2 bytes per character),
3) a termination code, which is 2 bytes of 00.

As far as what a LPCTSTR is, well, it depends on how the original C code was compiled. If the compile-time constant UNICODE was defined, LPCTSTR maps to the LPCWSTR type, otherwide, it maps to LPCSTR.

LPCTSTR means a Long Pointer to a Constant TCHAR String.

TCHAR is another stringe little bugger that maps to either wchar_t (UNICODE) or char (ANSI) depending on if UNICODE is defined or not.

Oh screw it. It's a huge pile of crap to understand. Just read this[^].


By the way, it's actually EASIER to do Interop from C#/VB.NET than it is from VB6 because you have FAR greater control over how things get marshaled back and forth.

GeneralRe: How to use LPCTSTR in VB6. Pin
Septimus Hedgehog12-Apr-13 9:36
Septimus Hedgehog12-Apr-13 9:36 
QuestionRegisrtry Access Pin
SPSandy12-Apr-13 5:19
SPSandy12-Apr-13 5:19 
QuestionRe: Regisrtry Access Pin
Eddy Vluggen12-Apr-13 6:33
professionalEddy Vluggen12-Apr-13 6:33 
AnswerRe: Regisrtry Access Pin
SPSandy12-Apr-13 7:08
SPSandy12-Apr-13 7:08 
GeneralRe: Regisrtry Access Pin
Eddy Vluggen12-Apr-13 7:25
professionalEddy Vluggen12-Apr-13 7:25 
GeneralRe: Regisrtry Access Pin
SPSandy12-Apr-13 7:36
SPSandy12-Apr-13 7:36 
GeneralRe: Regisrtry Access Pin
Eddy Vluggen12-Apr-13 8:07
professionalEddy Vluggen12-Apr-13 8:07 
QuestionRabin-Karp-Matcher Pin
d3ad-d3vil12-Apr-13 2:05
d3ad-d3vil12-Apr-13 2:05 
AnswerRe: Rabin-Karp-Matcher Pin
Eddy Vluggen12-Apr-13 6:31
professionalEddy Vluggen12-Apr-13 6:31 
AnswerRe: Rabin-Karp-Matcher Pin
Kenneth Haugland12-Apr-13 8:30
mvaKenneth Haugland12-Apr-13 8:30 
QuestionMessage Removed Pin
11-Apr-13 22:58
David venewald11-Apr-13 22:58 
QuestionHow to catch message WM_COPYDATA in VB? Pin
Member 989133411-Apr-13 22:02
Member 989133411-Apr-13 22:02 
AnswerRe: How to catch message WM_COPYDATA in VB? Pin
Thomas Daniels11-Apr-13 22:10
mentorThomas Daniels11-Apr-13 22:10 
GeneralRe: How to catch message WM_COPYDATA in VB? Pin
Member 989133411-Apr-13 22:23
Member 989133411-Apr-13 22:23 
GeneralRe: How to catch message WM_COPYDATA in VB? Pin
Thomas Daniels11-Apr-13 22:30
mentorThomas Daniels11-Apr-13 22:30 
GeneralRe: How to catch message WM_COPYDATA in VB? Pin
Member 989133411-Apr-13 22:54
Member 989133411-Apr-13 22:54 
GeneralRe: How to catch message WM_COPYDATA in VB? Pin
Thomas Daniels11-Apr-13 22:59
mentorThomas Daniels11-Apr-13 22:59 

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.