Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Code not working on window 8 of c++

Posted on 2013-10-27
2
Medium Priority
?
296 Views
Last Modified: 2013-11-20
hi
code working fine on window XP but on window 8 not working and project setting character  set==Use Multi-Byte Character Set other then UNICODE
and no compile error  on window 8 please suggest the solution
 
Cstring FolerPath;
Bitmap bmp;

int nLen = FolerPath.GetLength() + 1;
WCHAR* pwsz = new WCHAR [nLen];  
mbstowcs (pwsz,FolerPath,nLen);
CLSID encoderClsid;
GetEncoderClsid(L"image/bmp",&encoderClsid);            
bmp.Save(pwsz,&encoderClsid,NULL);                        
delete pwsz;

error on saving bitmap =win32Error on window 8  at Execution of program and many time exe not execute on window 8  .
0
Comment
Question by:davinder101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 35

Expert Comment

by:sarabande
ID: 39606633
you probably need to check the return values of the calls above the Bitmap::Save.

I would assume that GetEncoderClsid returns -1 what is an error.

Sara
0
 
LVL 35

Accepted Solution

by:
sarabande earned 1500 total points
ID: 39606647
if i am right you need to install the missing encoder (32-bit) at your windows 8.

Sara
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question