私はこのcodieでエラーがあります。intをLPUNITに変換できません
'midiInGetID': 'LPUINT' から 'int型*' からパラメータ2を変換することはできません int *
とLPUNIT
は何を意味するのでしょうか? UINTに変更した後
struct midi_in_list_node
{
int midi_in_number;
HMIDIIN midi_in;
struct midi_in_list_node *next_midi_in_list_node;
};
struct midi_in_list_node *first_midi_in_list_node = NULL;
void CALLBACK midi_in_handler(HMIDIIN midi_in, UINT msg_type, DWORD user_data, DWORD midi_msg, DWORD param2)
{
int midi_in_number;
midiInGetID(midi_in, &midi_in_number);
if (msg_type == MIM_DATA)
{
、私は他のエラーを持っている:
1>------ Build started: Project: MIDI, Configuration: Debug Win32 ------
1>Compiling...
1>MIDI.cpp
1>c:\users\wildfire\documents\visual studio 2008\projects\midi\midi\midi.cpp(103) : warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(324) : see declaration of 'sscanf'
1>Linking...
1>MIDI.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "void __stdcall midi_in_handler(struct HMIDIIN__ *,unsigned int,unsigned long,unsigned long,unsigned long)" ([email protected]@[email protected]@[email protected])
1>MIDI.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __stdcall control_handler(unsigned long)" ([email protected]@[email protected])
1>MIDI.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __stdcall control_handler(unsigned long)" ([email protected]@[email protected])
1>MIDI.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
1>MIDI.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
1>C:\Users\Wildfire\Documents\Visual Studio 2008\Projects\MIDI\Debug\MIDI.exe : fatal error LNK1120: 5 unresolved externals
1>Build log was saved at "file://c:\Users\Wildfire\Documents\Visual Studio 2008\Projects\MIDI\MIDI\Debug\BuildLog.htm"
1>MIDI - 6 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
投稿を編集してUNIT/UINTの入力ミスを修正してください。また、あなたはCのポインタを理解していないと言っていますか? –