From: RossettoeCioccolato on
Would someone please explain to me how TH32CS_SNAPMODULE and
TH32CS_SNAPMODULE32 are supposed to work on amd64. I am using them with
CreateToolhelp32Snapshot both with native amd64 and under wow64 on Windows
Longhorn Server beta 2. When I use them within a native amd64 application
both flags always succeed but the snap with TH32CS_SNAPMODULE32 is always
empty. When I use them under wow64, CreateToolhelp32Snapshot always fails
when the pid is for a native amd64 app and always succeeds when the PID is
for an x86 process. However, the call with with TH32CS_SNAPMODULE32 once
again always is empty. This isn't the way that it was explained at
http://groups.google.com/group/microsoft.public.win32.programmer.kernel/browse_thread/thread/78181c4c75912255/c9696cfcf269530c?lnk=st&q=&rnum=1&hl=en#c9696cfcf269530c.

Am I supposed to use a different sized (i.e. 32-bit) structure when using
the TH32CS_SNAPMODULE32 on native amd64 or under wow64?

Regards,

George.


From: "Jeffrey Tan[MSFT]" on
Hi George,

Thanks for your post!

Does your AMD64 mean x64 CPU? Have you tried it on a WinXP or Win2003 64bit
version? Longhorn Server is still in beta version, there may be many bugs
in it, so officially, we do not provide support for it currently.

If this issue also exist on WinXP or Win2003 64bit version, please feel
free to tell me, I will perform some test for you. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

From: RossettoeCioccolato on
Jeffrey,

Thanks for your reply.

> Does your AMD64 mean x64 CPU?<

Yes.

> Have you tried it on a WinXP or Win2003 64bit version? <

No. Sorry but I don't have any machines set up with them right now.

> Longhorn Server is still in beta version, there may be many bugs in it, so
> officially,
> we do not provide support for it currently. <

Yes, however answering my question does not require you to support the beta
OS. Rather, I am asking how to use TH32CS_SNAPMODULE32 on the x64 platform
to get both 64-bit and 32-bit modules. Unfortunately there is no
documentation for this flag. Microsoft must know what its design
*intention* is for this flag (irrespective of whether or not it actually
works on any particular version of Windows). Am I supposed to sequentially
call TH32CS_SNAPMODULE and then TH32CS_SNAPMODULE32 from an x64 program and
then merge the results? Does the same algorithm apply to a 32-bit app
running under wow64? Again, I am not asking whether or not it actually
works; I am just asking what the design goal is.

Regards,

George.



From: "Jeffrey Tan[MSFT]" on
Hi George,

Thanks for your feedback!

Yes, I understand your scenario. But, it seems that I can not find any
document or information regarding TH32CS_SNAPMODULE32 flag. I suspect it is
an undocumented flag, yes? If not, please feel free to point the official
document to me, I will help you on it. Thanks.

The only information I can find regarding TH32CS_SNAPMODULE32 flag is "Ivan
Brugiolo [MSFT]"'s reply, I will try to contact him on more information
regarding this flag.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

From: "Jeffrey Tan[MSFT]" on
Hi George,

Sorry for letting you wait!

Based on the feedback from the developer team, TH32CS_SNAPMODULE will
provide you native modules. You can OR TH32CS_SNAPMODULE32 with
TH32CS_SNAPMODULE to get 32-bit modules also when on a 64-bit box. It
exists to indicate that you want the extra 32-bit module state.

TH32CS_SNAPMODULE32 is not meaningful in 32-bit code. toolhelp in a 32-bit
app should only give you the 32-bit modules in the target.

Hope this information helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.