Category : Files from Magazines
Archive   : WDJAN92.ZIP
Filename : 3N01064A
#include
#include
#include
#include "extstr.h"
char **StringPointers;
int LoadExternalStrings_(HANDLE ResourceFile);
int LoadExternalStrings(HANDLE ResourceFile)
{
char Message[256];
if(!LoadExternalStrings_(ResourceFile))
{
if(!LoadString(ResourceFile, 0, Message, 255))
strcpy(Message, "Can't load language strings!");
MessageBox(NULL, Message, NULL, MB_ICONSTOP);
return 0;
}
else
return 1;
}
int LoadExternalStrings_(HANDLE ResourceFile)
{
char *StringBuffer;
size_t Offset, Length, SpaceLeft, BufferSize;
char *LoadPoint;
StringPointers = (char **)malloc(
sizeof(char*)*(1+WINEXT_LINES));
BufferSize = WINEXT_CHARS;
StringBuffer = (char *)malloc(
sizeof(char)*BufferSize);
LoadPoint = StringBuffer;
SpaceLeft = BufferSize-1;
for(Offset = 1; Offset < WINEXT_LINES; ++Offset)
{
if(SpaceLeft < 255)
{
if((UINT_MAX - 512) > BufferSize)
{
BufferSize += 512;
StringBuffer = (char *)realloc(
StringBuffer, BufferSize);
if(StringBuffer == NULL)
return 0; /* FAILURE! */
}
else
return 0; /* FAILURE! */
}
Length = LoadString(ResourceFile, Offset, LoadPoint, SpaceLeft);
StringPointers[Offset] = LoadPoint;
LoadPoint += Length+1;
}
return 1; /* SUCCESS! */
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/