资源简介
flex中调用dll,可以让大家方便的控制各种硬件设备等
代码片段和文件信息
// MyTestDll.cpp : Defines the initialization routines for the DLL.
//
#include “stdafx.h“
#include “MyTestDll.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyTestDllApp
BEGIN_MESSAGE_MAP(CMyTestDllApp CWinApp)
//{{AFX_MSG_MAP(CMyTestDllApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyTestDllApp construction
CMyTestDllApp::CMyTestDllApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CMyTestDllApp object
// ===============================================================
CMyTestDllApp theApp;
#pragma comment(lib “FlashRuntimeExtensions.lib“)
FREContext context;
// ===============================================================
// 播放本DLL内的WAV声音资源,默认异步操作
// ===============================================================
#include
#pragma comment(lib “Winmm.lib“)
BOOL PlayWavRes(char *pFile BOOL bAsyn)
{
HMODULE hMod = theApp.m_hInstance;
int nFileLen = strlen(pFile);
int nSndIdx = 0;
BOOL bRet;
if (nFileLen > 3)
{
DWORD dwFlag = (SND_FILENAME | SND_NODEFAULT);
dwFlag |= (bAsyn ? SND_SYNC : SND_ASYNC);
bRet = PlaySound((LPCTSTR)pFile NULL dwFlag);
}
else
{
nSndIdx = atoi(pFile) + 1000;
DWORD dwFlag = (SND_RESOURCE | SND_NODEFAULT);
dwFlag |= (bAsyn ? SND_SYNC : SND_ASYNC);
if(!hMod) hMod = GetModuleHandle(NULL); // NULL则取EXE的句柄
bRet = PlaySound((LPCTSTR)nSndIdx hMod dwFlag);
}
return bRet;
}
// ===============================================================
// 转换中文
// ===============================================================
void utf8_to_ansi(char* src char* &dest)
{
int wcsLen = ::MultiByteToWideChar(CP_UTF8 NULL src strlen(src) NULL 0);//测试转换
wchar_t* wszString = new wchar_t[wcsLen + 1];
::MultiByteToWideChar(CP_UTF8 NULL src strlen(src) wszString wcsLen); //utf8 转Unicode
wszString[wcsLen] = ‘\0‘;
int ansiLen = ::WideCharToMultiByte(CP_ACP NULL wszString wcslen(wszString) NULL 0 NULL NULL);
dest = new char[ansiLen + 1]; //unicode版对应的strlen是wcslen
::WideCharToMultiByte(CP_ACP NULL wszString wcslen(wszString) dest ansiLen NULL NULL);
dest[ansiLen] = ‘\0‘;
delete [] wszString;
}
// ===============================================================
// 获取Char*长度
// ===============================================================
int getCharLength(c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 20427 2012-03-16 03:37 FlexANEDll_TestPrj\01_MyTestDll\FlashRuntimeExtensions.h
文件 8614 2012-03-16 03:38 FlexANEDll_TestPrj\01_MyTestDll\FlashRuntimeExtensions.lib
文件 340 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.clw
文件 5917 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.cpp
文件 230 2013-08-30 17:26 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.def
文件 4263 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.dsp
文件 541 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.dsw
文件 2065 2013-08-30 17:36 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.h
文件 50176 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.ncb
文件 53760 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.opt
文件 1836 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.plg
文件 3083 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\MyTestDll.rc
文件 2603 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\ReadMe.txt
文件 24576 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\Release\MyTestDll.dll
文件 2152 2013-08-30 17:45 FlexANEDll_TestPrj\01_MyTestDll\Release\MyTestDll.lib
文件 401 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\res\MyTestDll.rc2
文件 381 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\Resource.h
文件 211 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\StdAfx.cpp
文件 1447 2013-08-30 17:10 FlexANEDll_TestPrj\01_MyTestDll\StdAfx.h
文件 1710 2013-08-31 17:25 FlexANEDll_TestPrj\02_MyLibrary\.actionsc
文件 304 2013-08-31 17:25 FlexANEDll_TestPrj\02_MyLibrary\.flexLibProperties
文件 475 2013-08-31 17:24 FlexANEDll_TestPrj\02_MyLibrary\.project
文件 88 2013-08-31 17:24 FlexANEDll_TestPrj\02_MyLibrary\.settings\org.eclipse.core.resources.prefs
文件 2104 2013-08-31 17:30 FlexANEDll_TestPrj\02_MyLibrary\bin\MyLibrary.swc
文件 418 2013-08-31 17:29 FlexANEDll_TestPrj\02_MyLibrary\src\com\MyDllTest\MyDllAs.as
文件 1642 2013-08-25 17:09 FlexANEDll_TestPrj\03_MyANEPack\2.p12
文件 479 2013-08-31 17:31 FlexANEDll_TestPrj\03_MyANEPack\extension.xm
文件 1267 2013-08-31 17:30 FlexANEDll_TestPrj\03_MyANEPack\library.swf
文件 2104 2013-08-31 17:30 FlexANEDll_TestPrj\03_MyANEPack\MyLibrary.swc
文件 9584 2013-08-31 17:33 FlexANEDll_TestPrj\03_MyANEPack\MyTestDll.ane
............此处省略49个文件信息
- 上一篇:WAS基本使用手册
- 下一篇:PCM时分复用电路的设计与仿真
相关资源
- 用VS2015编译的hiredis.dll
- Data Networks (2nd Edition) Solutions
- Windows和Linux下bison和flex的安装包
- openblas vs2013 x64 库dll和lib
- NPOI Excel第三方开源dll 2.2.1和2.1.1版本
- Win 7 原版主题的三个文件和主题还原
- 查看进程、线程、DLL模块等信息
- DevComponents.DotNetBar2.dll
- msvcp120d.dll+msvcr120d.dll(x86x64)
- 群友分享的FLEX工作流设计器(含源码
- hadoop2.9.1 winutils.exe hadoop.dll
- 本地DLL通用验证码识别-通杀验证码
- Flexsim仿真案例集合
- 现代操作系统第四版205471
- 西门子触摸屏编程WinCC_flexible经典教程
- Visual Assist X 10.9.2389 补丁 (VA_X.dll)
- 如何编写CAPL DLL
- 解决classification_dll.dll无法找的问题
- Adobe CS6 amtlib.dll和Adobe CS6 64位 amtlib.
- ArcGIS10.4 DeStop和Engine破解DLL文件
- d3dx9_27.DLL202096
- tcnative-1.dll 1.2.14 64位
- msvcp100d.dll msvcr100d.dll
- SafeFLEXlmInstaller.msi
-
convert_cascade 转换xm
l文件 含dll文件 - FlexGraphics_Full_1.8.zip
- sumo-src-0.19.0.tar.gz
- Qt5 for windows plugin dll
- WinIO 资源包含winio.lib、winio.h、winio.
- Let Us C - Yashwant Kanetkar
评论
共有 条评论