Re: WMI question [7 Attachments]
John Smith <[email protected]>
| Newsgroups | gmane.comp.windows.off-topic |
|---|---|
| Message-ID | <[email protected]> |
Hi Everyone, Thanks for all of the replies. If anyone wants to take a look, the project contains several different files, I just tried to zip the entire project and have attached it to this reply but google is being difficult, so I sent the individual files instead. My build environment is XP Pro Sp2, MSVC6.0 Professional and the I am running these tests under an administrator account. The zip file contains a 'Read This' text file that contains some important information and the code is well commented. I have been experimenting with the code since my last post and I have detailed my discoveries in the code comments. Thanks in advance for any pointers (no pun intended : ) that may point out something I over looked. I just found out that google will not let me attach a lib file that is needed for the project. the file is WbemUuid.lib, if your SDK's are up to date, you should have it already. On Fri, Dec 3, 2010 at 3:25 PM, Chris Tavares <cct-/[email protected]>wrote: > > > And can you post the actual error message? What address is it trying to > access when the access violation happens? > > > > -Chris > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Stoyan Damov > *Sent:* Friday, December 03, 2010 1:18 PM > *To:* [email protected] > *Subject:* Re: [OT] WMI question > > > > > > John, it's not the pointer incrementation that causes the AV, it's the > dereferencing of the pointer (which is most probably 0). Can you paste some > code? > > On Fri, Dec 3, 2010 at 11:07 PM, Kim Gräsman <[email protected]> > wrote: > > > > Hi John, > > On Fri, Dec 3, 2010 at 21:49, John Smith <[email protected]> wrote: > > > > I'm wondering if the information I am querying for (i.e. Win32_AccountSID) > in this case, is returning information that is not what the wcslen( ) is > expecting... Why else would the 'eos' pointer incrementation cause the > access violation? Any ideas? > > > > Yeah, that's probably it. > > > > wcslen is a function to get the length of a zero-terminated wide-character > string, usually of type "const wchar_t*" or "LPCWSTR" -- what are you > passing to it? > > > > - Kim > > > > >