Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 6, 1997

Check for NULLs Returned from DLL Calls

After a call to a DLL, the return value often contains a null. One way to eliminate the null is to look for Chr$(0), as in the example:

 
Dim CheckForNull As Integer
CheckForNull = Instr(YourString, _
        Chr$(0))
If CheckForNull > 0 then YourString = _
        Left$(YourString, CheckForNull - 1)

Marc Mercuri
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date