PlaySound PlaySound函数的声明为: BOOL PlaySound(LPCSTR pszSound, HMODULE hmod,DWORD fdwSound); 参数pszSound是指定了要播放声音的字符串,该参数可以是WAVE文件的名字,或是WAV资源的名字,或是内存中 声 音数据的指针,或是在系统注册表WIN.INI中定义的系统事件声音。如果该参数为NULL则停止正在播放的声音。参数hmod是应用程序的实例句柄,当播放WAV资源时要用到该参数,否则它必须为NULL。参数fdwSound是标志的组合,如下表所示。若成功则函数返回TRUE,否则返回FAL...
MessageBeep sndPlaySound PlaySound 音频播放
用多媒体API,源文件中需要包含头文件 Mmsystem.h,在Project->Settings->Link->Object/libray module中加入库 Winmm.lib。
1、MessageBeep
MessageBeep函数主要用来播放系统报警声音。系统报警声音是由用户在控制面板中的声音(Sounds)程序中定义的,或者在WIN.INI的[sounds]段中指定。
该函数的声明为: BOOL MessageBeep(UINT uType);
参数uType说明了...
启动命令提示符输入“net start >d:services.txt”就可以把当前系统开启的服务输出到d:\services.txt中,或用sc query(即可列出当前服务的详细信息),sc query state=all(可列出所有的服务,包括硬件驱动服务)
启动命令提示符输入\wmic进行安装,之后就可以在命令提示符使用WMIC脚本,在确保系统无毒或正常使用的情况下,启动命令提示符输入“wmic startup list brief >d:\start.txt”将系统所有的自启动项输出到d:\start.txt
另外在命令提示符输入WMIC,在WMIC提示符w...
;布斯算法示例;一位相乘;=============ONEPROBLEM============assume cs:code
code segmentstart: mov bl,2 ;被乘数 mov al,-3 ;乘数,返回值也在al中 mov cl,4 ;先把被乘数移到高位,方便加减 shl bl,cl and al,0fh ;初始化乘数
mov dh,al shl dh,1 ;先添加一个辅助位0 mov dl,dh and dl,3 ;先判断辅助位和第一位. call panduan
mov cx,3begin: shr dh,1 mov dl,dh and dl,3 ca...
来源: 网易博客
相信电脑界的每个人都痛恨计算机病毒,她给我们带来了很多麻烦和损失,可你知道编写病毒的方法和过程吗?在此我仅以VB编写为例,揭开她的面纱。
用VB编写病毒需要考虑到如下几点:
感染主机
首先染毒文件运行后先要判断主机是否以感染病毒,也就是判断病毒主体文件是否存在,如果不存在则将病毒主体拷贝到指定位置(如:
将病毒文件拷贝到c:\windows\system\),可用filecopy语句实现;如果病毒已感染主机则结束判断。
例如,判断C:\windows\system\Killer.exe是否存在,如果有则退出判断,如果没有则证明本机未感染病毒...
Turbo C 2.0 设置详解 对于初学程序设计的人来说Turbo C 2.0无疑是最简单最理想的入门语言环境之一,但也常由于环境变量设置的不正确导致程序无法编译运行,严重打击了初学者来之不易的自信心。为了迅速解决此类问题,使大家能把精力集中到程序设计上来,我们特地编写本文以帮助有心涉足编程领域的初学者。1.准备TC2.0 从编程中国下载TC2.0,下载地址为: http://www.bccn.net/soft/kfyy/c/200409/1.html 下载之后的工作就是解压缩了,解压缩可以使用WinZip或WinRar。在此我们假设将TC解压到"x:\TC20"目录...
新建功能:
Private Sub xinjian_Click()
Dim a As String
Dim b As Integer
a = "文件" + Caption + "的文字已经改变。" + Chr(13) + "想保存文件吗?"
If Text1.Text > "" Then b = MsgBox(a, vbApplicationModal + vbDefaultButton1 + vbYesNoCancel + vbExclamation, "记事本")
Select Case b
Case 6
CommonDial...
<转自:http://topic.csdn.net/u/20070606/09/07769340-b843-46a9-b0cc-acb65a90db40.html〉
C++太复杂了。我猜想你一定是在计算机屏幕前不住地点头。其实我也在使劲的点头。没错,C++着实复杂,大概是迄今为止最复杂的语言。于是,便产生了一个推论:C++难学难用。 这句话也相当准确,但并非所有时候都这样。C++的学习和使用可以分为若干个层面,这些层面由简到繁,由易到难,分别适合不同层次的学习者和使用者。 先让我们来看看C++究竟有多复杂。我大致列了个清单,包括C++的主要语言特性。基本的一些特性,象变量、条件、选择等...
#include <stdio.h> #include <stdarg.h>
/* calculate sum of a 0 terminated list */ void sum(char *msg, ...) { int total = 0; va_list ap; int arg; va_start(ap, msg); while ((arg = va_arg(ap,int)) != 0) { total += arg...
int wsprintf( LPTSTR lpOut, // 输出缓冲区,最大为1024字节
LPCTSTR lpFmt, // 格式字符串
... // 需输出的参数);
The wsprintf function formats and stores a series of characters and values in a buffer.
使用此函数可将数字转为字符串;而且可以用它来连接多个字符串和数字。
例:
int x=6;
LPTSTR szBuffer=new TCHAR[1024];
wsprintf(szBuffe...
function [ahat,bhat]=chebyshevpade(f,tol)
%see more go to www.matlabsky.cn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% chebyshevpade.m%% Chebyshev-Pade Algorithm%% This script takes the function f(x) sampled at the Chebyshev-Gauss-Lobatto % nodes and compu...
function [Cone,EndPlate1,EndPlate2] = Cone(X1,X2,R,n,cyl_color,closed,lines)%
%see more information go to www.matlabsky.cn% This function constructs a cylinder connecting two center points % % Usage :% [Cone,EndPlate1,EndPlate2] = Cone(X1,X2,R,n,cyl_color,closed,lines)% % Cone-------Handle o...
function s=exp2fit(t,f,caseval,options)
%for more information go to www.matlabsky.cn
% exp2fit solves the non-linear least squares problem% of the specific exponential functions:% --- caseval = 1 ----% f=s1+s2*exp(-t/s3)% ------------------%% --- caseval = 2 ----% f=s1*(1-exp(-t/s2)) %i....
%Prims Algorithm%coded by Vikramaditya V. Kundur
%more information www.matlabsky.cn
clcfid = fopen('testfile1.txt', 'r'); % Input file%Input file should be in the form of a text file.%5 %order of matrix%0 2 3 4 0%2 0 1 2 5%3 1 0 1 2%4 2 1 0 2%0 5 2 2 0l = fscanf(fid, '%g %g...
function [N, D] = ratpolyfit(x,y,kn,kd)% Ratpolyfit Rational Polynomial Fitting%% This programs finds 2 polynomials N(x) and D(x),% of user given order kn and kd respectively,% such that N(xi)/D(xi) ~= y(xi) in a least squares sense.%%usage: [N, D] = ratpolyfit(x, y, kn, kd)%%note: kn and kd...
function [sp, spcost] = dijkstra(matriz_costo, s, d)% This is an implementation of the dijkstra磗 algorithm, wich finds the % minimal cost path between two nodes. It磗 supoussed to solve the problem on % possitive weighted instances.
% the inputs of the algorithm are:%farthestNode: the farthest no...
本代码实现了,由两点和半径绘制空间任意圆柱
function [Cylinder EndPlate1 EndPlate2] = cylinder3(X1,X2,r,n,cyl_color,closed,lines)%% This function constructs a cylinder connecting two center points % % Usage :% [Cylinder EndPlate1 EndPlate2] = cylinder3(X1+20,X2,r,n,'r',closed,lines)% % Cylinder-------Handle of the...
Matlab Sky联盟----打造最优秀、专业和权威的Matlab技术交流平台!
网址:http://www.matlabsky.cn /com/org/net
邮箱:matlabsky@gmail.com
QQ群:23830382 40510634 16233891(满了) 44851559(满了)
MatlabSky拥有40多个专业版块,内容涉及资料下载、视频教学、数学建模、
数学运算、程序设计、GUI开发、simulink仿真、统计概率、拟合优化、
扩展编程、算法研究、控制系统、信号通信、图像处理...
薛定宇《高等应用数学问题的MATLAB求解》http://www.matlabsky.com/thread-177-1-1.html樊京《MATLAB控制系统应用与实例》http://www.matlabsky.com/thread-324-1-1.html李南南《MATLAB 7简明教程》http://www.matlabsky.com/thread-321-1-1.htmlsandy《Matlab与数值分析简明教程》http://www.matlabsky.com/thread-320-1-1.html满晓宇《战胜MATLAB必做练习50题》http://www.matlabsky....
Gerald Recktenwald 《Numerical Methods with MATLAB》(NMM1.5数值分析工具箱) http://www.matlabsky.com/thread-325-1-1.htmlDahua Lin《Statistical Learning Toolbox》(统计学习工具箱) http://www.matlabsky.com/thread-301-1-1.htmlSergiy Iglin《Graph Theory Toolbox》(图论工具箱) http://www.matlabsky.com/thread-295-1-1.htmlJouni Ha...