It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

.exe Crashs after a Open Cd Drive Command

Moderator: dafunkymunky

.exe Crashs after a Open Cd Drive Command

Postby Blacktronics on Sun Feb 15, 2009 8:59 am

Hi All i done a Fake Virus in visual Basic 6.0 but it won´t work like it have to do i made some error messages and then this part :

X = MsgBox("Do you like Coffe? here a FREE coffe cup holder !", 0 + 16, "FXDJ9")

Dim lRet As Long
lRet = mciSendString("set CDAudio door open", returnstring, 127, 0)

Here the Application Crashs
the window that have to open after that don´t opens just the sound plays and the appliation crashs

X = MsgBox("CRITICAL ERROR SYSTEM WILL REBOOT NOW", 0 + 16, "SYSTEM FAILURE")

i made buttons one Exit and One Start by pressing the start Key it starts
at the top (in General ) i addet That :
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
You do not have the required permissions to view the files attached to this post.
Blacktronics
 
Posts: 4
Joined: Sat Feb 14, 2009 10:16 pm

Re: .exe Crashs after a Open Cd Drive Command

Postby Keithuk on Sat Jul 11, 2009 2:07 pm

Blacktronics wrote:Hi All i done a Fake Virus in visual Basic 6.0 but it won´t work like it have to do i made some error messages and then this part :

Dim lRet As Long
lRet = mciSendString("set CDAudio door open", returnstring, 127, 0)


I know this is an old topic but no one has given a useful solution.

I made an app like this 8 years ago.

When you open a CD Rom door you use

Call mciSendString("Set CDAudio Door Open", 0&, 0&, 0&)

when you close it you would use

Call mciSendString("Set CDAudio Door Closed", 0&, 0&, 0&)

:wink:
User avatar
Keithuk
 
Posts: 11
Joined: Fri Jun 01, 2007 11:16 am
Location: Staffordshire, England


Who is online

Users browsing this forum: No registered users and 2 guests