Jump to content

binbinhfr

Active Members
  • Posts

    24
  • Joined

  • Last visited

binbinhfr's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi @JAPP Thanks fo your help. It's exactly what I needed !
  2. It just happened again. I used last version of Process Hack, found my exe running, but again, Process Hack did not manage to kill it.... I had to reboot... It says something like : unable to kill a process which is already stopping . (french to english translation)
  3. I installed Process Hack 2, and we will see next time... I will let you now.
  4. no, just the name of the EXE, appearing 4 times... I will gather more informations next time.
  5. already tried taskkill /F , same result.... Only reboot works... Note that it's a problem I can sometimes also have when compiling other programs under VC++, when the tested compiled program crashes badly... -> the ex is also locked until next reboot...
  6. It happens again yesterday. I did look at the handle using Process Explorer which is a quite precise tool from MS : https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer I found 4 reference to my EXE running. But impossible to kill any of the 4 tasks with the "kill" button... Do you have a trick to kill them "harder" ?
  7. So I tried the accelerators, but they works randomly, very strange. Infact, it seems that I need to click the button once before being able to use the accelerator bound to this button... Do I miss something ? Note that my hotkeys worked fine directly calling the callback of the same button. Forget it, I made an error with the array size, that must be precise....
  8. oh great, I did not know this one ! but as I see, you can only attach keys to existing Controls. Not possible to have a key attached to a function (or maybe with a trick using hidden controls ?). But it's already a big help ! Thanks.
  9. no rename. Need to reboot, and then the file is deletable
  10. read the top of my post : that is what I described : impossible to write the exe. Maybe I was not clear. Sorry english is not native to me.😉 And I don't know if it's really "locked". But I cannot delete it.
  11. The first issue is this one. And afterwards, I have a neverending issue at compilation time, about "cannot write EXE". So the operation that "locks" the EXE is probably this first runtime error. It leaves something "hanging"... (maybe a driver, because I deal with opening MIDI drivers...)
  12. for the moment it works, but it's a rare bug. It only happens if there is some kind of crash after compile/running. Often when once runned, the program gives an error like "variable not yet defined" or something like that... I'll tell you. Thanks all for your help anyway.
  13. Hi, I am trying to receive MIDI messages from a MIDI device. I can open it and send out MIDI messages, but I have more problems to receive MIDI messages. It is based on events, and I have problem interfacing with the window API. Basically I have 2 functions : midiInOpen (that opens for reception, with a reference to a callback function that I must provide (using the CALLBACK_FUNCTION flag) https://docs.microsoft.com/en-us/previous-versions/ms711610(v=vs.85) and the callback function itself, midiInProc https://docs.microsoft.com/en-us/previous-versions/ms711612(v=vs.85) (I wonder what is this function infact, because I have to write my own... is it a template ?) So how to write my own MidInProc, and how to declare it properly in the midiInOpen call ??? Here is what I wrote but it is not working, even though the midiInOpen returns no error (so the device is opened, but the callback does not give any result when MIDI data is coming).... So I wonder if it's the right way to use DllCallbackRegister and DLLCallbackGetPtr, and if I understood the params declaration... Especially in my MidiWinProc2 definition, where finally I do not give any type/size to these params... But I suppose it is the role of DllCallbackRegister ? global $cbHandle = DllCallbackRegister("MidiWinProc2", "int", "int;uint;dword_ptr;dword_ptr;dword_ptr") $iRet = _MidiIn_Open($nMidiInDevice, DllCallbackGetPtr($cbHandle), 0, BitOR($CALLBACK_FUNCTION, $MIDI_IO_STATUS)) Func MidiWinProc2($hMidiIn,$wMsg,$dwInstance,$dwParam1,$dwParam2) debug("midi in 2") EndFunc Func _MidiIn_Open($uDeviceID, $dwCallback, $dwCallbackInstance, $dwFlags) Local $aResult = DllCall($MIDI_WinMM_DLL,"int","midiInOpen","int*", 0,"uint_ptr",$uDeviceID,"dword_ptr",$dwCallback,"dword_ptr",$dwCallbackInstance,"dword",$dwFlags) If @error Or Not IsArray($aResult) Then Return SetError(1, 1, False) If $aResult[0] = $MMSYSERR_NOERROR Then Return 1 ElseIf $aResult[0] = $MMSYSERR_ALLOCATED Then Return SetError(1,1,0) ElseIf $aResult[0] = $MMSYSERR_BADDEVICEID Then Return SetError(2,2,0) ElseIf $aResult[0] = $MMSYSERR_INVALFLAG Then Return SetError(3,3,0) ElseIf $aResult[0] = $MMSYSERR_INVALPARAM Then Return SetError(4,4,0) ElseIf $aResult[0] = $MMSYSERR_NOMEM Then Return SetError(5,5,0) Else Return SetError(6,6,0) EndIf EndFunc ; Thanks for your help
×
×
  • Create New...