CPI_Stream.c
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:1k
- #include "stdafx.h"
- #include "globals.h"
- #include "CPI_Stream.h"
- CPs_InStream* CP_CreateInStream_LocalFile(const char* pcFlexiURL, HWND hWndOwner);
- CPs_InStream* CP_CreateInStream_Internet(const char* pcFlexiURL, HWND hWndOwner);
- //
- CPs_InStream* CP_CreateInStream(const char* pcFlexiURL, HWND hWndOwner)
- {
- CPs_InStream* pNewStream = NULL;
- int iURLLen = strlen(pcFlexiURL);
- if(iURLLen > 5)
- {
- char cHeader[6];
- memcpy(cHeader, pcFlexiURL, 5);
- cHeader[5] = ' ';
- if(stricmp(cHeader, "http:") == 0)
- {
- pNewStream = CP_CreateInStream_Internet(pcFlexiURL, hWndOwner);
- if(pNewStream)
- return pNewStream;
- }
- }
- pNewStream = CP_CreateInStream_LocalFile(pcFlexiURL, hWndOwner);
- if(pNewStream)
- return pNewStream;
- return NULL;
- }