Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Violation while loading music file

Status
Not open for further replies.

SteveCRM

Programmer
Joined
Oct 30, 2000
Messages
8
Location
US
I get an access violation for this block of code and I am not sure why!

char FileName[100];
char ShortFileName[100];
char todo[200];
GetWindowText(ghWnd_File, FileName, 100);
if(GetShortPathName(FileName, ShortFileName, 100) !=0) {
strcat(todo, "open ");
strcat(todo, ShortFileName);
strcat(todo, " type mpegvideo Alias mpeg");
mciSendString (todo, 0, 0, 0);
}
 
try to initialize variables:
char FileName[100]="";
char ShortFileName[100]="";
char todo[200]=""; John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top