Original Post
🔒 Locked
Quick Win32 question
Advertisement
Wow no response. Maybe it`s not as cut-and-dry as I thought. The Win32 API docs just say :
quote:
Windows 95: Points to a null-terminated string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?). This string must not exceed MAX_PATH characters.
Windows NT: Points to a null-terminated string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?).
There is a default string size limit for paths of MAX_PATH characters. This limit is related to how the FindFirstFile function parses paths. An application can transcend this limit and send in paths longer than MAX_PATH characters by calling the wide (W) version of FindFirstFile and prepending "\\?\" to the path. The "\\?\" tells the function to turn off path parsing; it lets paths longer than MAX_PATH be used with FindFirstFileW. This also works with UNC names. The "
\\?\" is ignored as part of the path. For example, "\\?\C:\myworld\private" is seen as "C:\myworld\private", and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as "\\
bill_g_1\hotstuff\coolapps".
You could use wildcards to drastically narrow the search:
*.jp* or *.jp??
Then exclude any false matches (e.g. "blah.jpx") in your own code.
AFAIK, that''s the only way to do it under Win32 apart from performing two searches, one for *.jpg and one for *.jpeg.
[Roll on LH/WinFS...
]
Simon O''Connor
Game Programmer &
Microsoft DirectX MVP
*.jp* or *.jp??
Then exclude any false matches (e.g. "blah.jpx") in your own code.
AFAIK, that''s the only way to do it under Win32 apart from performing two searches, one for *.jpg and one for *.jpeg.
[Roll on LH/WinFS...
Simon O''Connor
Game Programmer &
Microsoft DirectX MVP
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement