Click here to Skip to main content
15,888,984 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionOnTimedEvent Pin
ciacia23-May-07 6:35
ciacia23-May-07 6:35 
AnswerRe: OnTimedEvent Pin
Dave Kreskowiak23-May-07 6:39
mveDave Kreskowiak23-May-07 6:39 
GeneralRe: OnTimedEvent Pin
ciacia23-May-07 6:43
ciacia23-May-07 6:43 
AnswerRe: OnTimedEvent Pin
Dave Kreskowiak23-May-07 6:52
mveDave Kreskowiak23-May-07 6:52 
GeneralRe: OnTimedEvent Pin
ciacia23-May-07 7:27
ciacia23-May-07 7:27 
GeneralRe: OnTimedEvent Pin
Dave Kreskowiak23-May-07 7:37
mveDave Kreskowiak23-May-07 7:37 
GeneralRe: OnTimedEvent Pin
ciacia23-May-07 7:53
ciacia23-May-07 7:53 
GeneralRe: OnTimedEvent Pin
Dave Kreskowiak23-May-07 8:17
mveDave Kreskowiak23-May-07 8:17 
You're making a mistake with these strings ("255"). You're not creating an empty string 255 characters wide. YOu're making a string 3 characters wide, containging "255". Then in your mciSendString call, you're passing this string in parameters2, but in parameter 3, you're telling mciSendString that the string buffer you just passed in was 255 characters long. No, it's not, it's 3 characters long!

I think you're looking for this:
Dim strBuffer As New StringBuilder(255)


On top of that, you're completely ignoring the return value comming back from the call to mciSendString. You REALLY need to pay attention to that value:
Dim rc As Integer
rc = mciSendString("status track length", strBuffer, 255, Nothing)
If rc > 0 Then
    ' An error occured!
End If



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: OnTimedEvent Pin
ciacia23-May-07 8:48
ciacia23-May-07 8:48 
GeneralRe: OnTimedEvent Pin
Dave Kreskowiak23-May-07 9:44
mveDave Kreskowiak23-May-07 9:44 
QuestionEncrypting passwords in a database Pin
steve_rm23-May-07 5:42
steve_rm23-May-07 5:42 
AnswerRe: Encrypting passwords in a database Pin
Tarakeshwar Reddy23-May-07 6:03
professionalTarakeshwar Reddy23-May-07 6:03 
AnswerRe: Encrypting passwords in a database Pin
andyharman23-May-07 6:14
professionalandyharman23-May-07 6:14 
AnswerRe: Encrypting passwords in a database Pin
Dave Kreskowiak23-May-07 6:27
mveDave Kreskowiak23-May-07 6:27 
AnswerRe: Encrypting passwords in a database Pin
kubben23-May-07 7:00
kubben23-May-07 7:00 
QuestionCounting Records added and modified in a DataSet Pin
Quecumber25623-May-07 5:20
Quecumber25623-May-07 5:20 
AnswerRe: Counting Records added and modified in a DataSet Pin
Dave Kreskowiak23-May-07 6:19
mveDave Kreskowiak23-May-07 6:19 
GeneralRe: Counting Records added and modified in a DataSet Pin
Quecumber25623-May-07 6:51
Quecumber25623-May-07 6:51 
GeneralRe: Counting Records added and modified in a DataSet Pin
Dave Kreskowiak23-May-07 6:55
mveDave Kreskowiak23-May-07 6:55 
Questionpull data from access database table to vb.net Pin
jds120723-May-07 3:56
jds120723-May-07 3:56 
AnswerRe: pull data from access database table to vb.net Pin
Dave Kreskowiak23-May-07 6:43
mveDave Kreskowiak23-May-07 6:43 
QuestionUsing the character '&' in Label.Text Pin
RichFeldman23-May-07 3:44
RichFeldman23-May-07 3:44 
AnswerRe: Using the character '&' in Label.Text Pin
Kschuler23-May-07 4:10
Kschuler23-May-07 4:10 
Questionhow do u communicate btn a webserver and a remote computer via the internet? Pin
dleo1023-May-07 3:22
dleo1023-May-07 3:22 
AnswerRe: how do u communicate btn a webserver and a remote computer via the internet? Pin
Dave Herren23-May-07 3:36
Dave Herren23-May-07 3:36 

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.