Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 1 and Version 2 of ApplicationPathExample

Show
Ignore:
Author:
Bradley Smith (IP: 66.159.200.90)
Timestamp:
01/16/07 21:23:40 (17 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ApplicationPathExample

    v1 v2  
    1111{{{ 
    1212#!d 
     13/* Tested with DMD 1.0 */ 
     14 
    1315import std.c.windows.windows; 
    1416import std.c.stdio; 
    3234    strtmp.length = 1024; 
    3335 
    34     GetModuleFileNameA(GetModuleHandleA(null), cast(char*) strtmp, 1024); 
    35     int j = rfind(strtmp[0..strlen(strtmp)], "\\"); 
     36    GetModuleFileNameA(GetModuleHandleA(null), cast(char*) strtmp.ptr, 1024); 
     37    int j = rfind(strtmp[0..strlen(strtmp.ptr)], "\\"); 
    3638 
    3739    strtmp = strtmp[0..j+1];