We ciould use stack and parameter copy once under mainthread.We ciould use stack and parameter copy once under mainthread.
main_thread:
wbuttoncontroller:
Process WmChar: -> getchar_something_word_proc WmPaint
void wButtonController::ProcessWmChar () { ... switch ( this->event->main_mode ) { ... case 2: getchar_something_word_proc( this->event->hWnd, this->event->Type, this->event->wParam, this->event->lParam ); break; ... } ... }
void getchar_something_word_proc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { FileControler *fc = nullptr; char key_code[1]; int number; // 20190424 // does stop this. // exit(-1); // usually, keyup is still called. if ( sthw_call_once_key == 1 ) { sthw_call_once_key = 0; return; } // if ( is_alpha ( wParam ) == 0 ) return; // print_word = (char*) "aaa\r\nbbb\r\n"; key_code[0] = wParam; word_count++; word = m_concat( word, (char *) key_code ); // usually, the below is not necessary.. *( word + word_count ) = '\0'; word_character_number = (char *) charater_number( word, word_count ); printf("word: %s \r\n", word ); char** argv = (char**)malloc (sizeof(char*) * 2 ); fc = new FileControler (); // char** file_list = fc->get_files_001 ( "C:\\Users\\hogehoge\\Documents\\java009\\*.java", &number ); char** file_list = fc->get_files_001 ( "C:\\java009\\*.java", &number ); for( int i=0; i<number; i++ ) { print_word = m_concat( print_word, (char *) *(file_list + i ) ); print_word = m_concat( print_word, (char *) copyof("\r\n") ); *( argv + 1 ) = *(file_list + i ); numbering_main( 2, (char**)argv ); } // exit(-1); }