c++: how to convert wchar_t* to DWORD

I'm reading in a value from an INI file that is the frequency of which I need to perform an action during my file handling process.  The value will always be a postive numeric value.  Default is 32768 (32KB). When I use GetPrivateProfileString() I can read in the value but it comes in as a w_chart*.  I need a way to convert this value to a DWORD.  

Thanks.
i-mate05Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
Not a big deal, use

#include <stdlib.h>

wchar_t* p = L"32768";
DWORD dwValue = _wtol(p);

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jkrCommented:
BTW, why don't you use 'GetPrivateProfileInt()' here in the 1st place?
i-mate05Author Commented:
Thanks for the reply jkr.  Honestly I didn't even realize that call existed. I'm using someone elses code as a guideline and I didn't even think to look for that.  Thank you again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.