With that callstack, a WAG says its a shell extension causing problems. The things in the callstack is really beyond my knowledge. IDK what an overlay exactly is. Notice its not even a Perl thread, RtlpTpWorkCallback means its a http://msdn.microsoft.com/en-us/library/windows/desktop/ms684957%28v=vs.85%29.aspx thread. "call dword ptr
eax+1Ch" says its a C++ vtable call. eax is supposed to be a pointer to a vtable. 0x1C is an offset to a pointer in it. The C++ classes/method names reveal nothing on Google after a couple minutes of searching. Your original post code
my $struct = pack "LLLpLLLpLpLppLIppLLpILL",
(
88, #'lStructSize' # DWORD
$Handle, #'hwndOwner' # HWND
0, #'hInstance' # HINSTANCE
$lpstrFilter, #'lpstrFilter' # LPCTSTR
0,
0,
# $lpstrCustomFilter, #'lpstrCustomFilter' # LPTSTR
# length $lpstrCustomFilter, #'nMaxCustFilter' # DWORD
#I'm not able to make it work with CustomFilter
$nFilterIndex, #'nFilterIndex' # D
+WORD
$lpstrFile, #'lpstrFile' # LPTSTR
length $lpstrFile, #'nMaxFile' # DWORD
$lpstrFileTitle, #'lpstrFileTitle' # LPTSTR
length $lpstrFileTitle, #'nMaxFileTitle' # DWORD
$lpstrInitialDir, #'lpstrInitialDir' # LPCTSTR
$lpstrTitle, #'lpstrTitle' # LPCTSTR
$Flags, #'Flags' # DWORD
0, #'nFileOffset' # WORD
# 0, #'nFileExtension' # WORD
$nFileExtension, #'nFileExtension' # WORD
$lpstrDefExt, #'lpstrDefExt' # LPCTSTR
0, #'lCustData' # DWORD
0, #'lpfnHook' # LPOFNHOOKPROC
$lpTemplateName #'lpTemplateName' # LPCTSTR
, 0, 1
);
is wrong. L is always 32 bits. HWND->HANDLE->PVOID->void *, 32 or 64 bit type
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx. There are more mistakes in that pack code, including missing alignment holes. I wont cover them right now. Remember void *s and handles dont have to be readable memory addresses to be valid data. They can be offsets into a table. Or encrypted with XOR against a (C static) secret value pointers. They can also be DB primary key GUIDs or something. Win32::API uses Q or L for HANDLE/void *s/char *s/etc. See
https://metacpan.org/source/BULKDD/Win32-API-0.77/Type.pm#L160. I found
https://metacpan.org/source/JENDA/Win32-FileOp-0.16.02/FileOp.pm#L1217 but that is different from your pack() struct above. Looking through Win32::FileOp, nothing looks 64 bit compatible in it. " $Flags = unpack("L", substr $struct, 52, 4);" that is garbage on Win64.
I tried to contact the module's author to no avail. Also the other addresses mentioned in the perldoc bounce back.
Use RT bug tracker, dont send private emails to CPAN/maintainers authors. Its like asking for tech support in random blog posts. I see nothing I can associate with you at
rt://Win32::FileOp.
FileOp never calls CommDlgExtendedError. It is commented out. See
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646928%28v=vs.85%29.aspx and
https://metacpan.org/source/JENDA/Win32-FileOp-0.16.02/FileOp.pm#L1266. Getting that error code and the bool retval of
if ($fun->Call($struct)) { should be your first diagnostic. What is your Windows 8 Perl, 32 bit or x64? You didn't mention what the retval of Win32::FileOp::SaveAsDialog/console output is of your sample script in your OP.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.