| 770 | #ifdef NT |
| 771 | |
| 772 | static int get_module_filename( string * out ) |
| 773 | { |
| 774 | DWORD result; |
| 775 | string_reserve( out, 256 + 1 ); |
| 776 | string_truncate( out, 256 ); |
| 777 | while( ( result = GetModuleFileNameA( NULL, out->value, DWORD(out->size) ) ) == DWORD(out->size) ) |
| 778 | { |
| 779 | string_reserve( out, out->size * 2 + 1); |
| 780 | string_truncate( out, out->size * 2 ); |
| 781 | } |
| 782 | if ( result != 0 ) |
| 783 | { |
| 784 | string_truncate( out, result ); |
| 785 | return 1; |
| 786 | } |
| 787 | else |
| 788 | { |
| 789 | return 0; |
| 790 | } |
| 791 | } |
| 792 | |
| 793 | #endif |
| 794 |
no test coverage detected