error LNK2019: unresolved external symbol __imp__AlphaBlend@44 referenced in function "void __cdecl

因为AlphaBlend是在wingdi.h文件中定义的,链接的时候需要用到一个windows里面的一个msimg32这样的一个lib库,  所以要使用它 还需要在链接器的输入中的附加依赖项中包含msimg32.lib文件才行

error LNK2001: unresolved external symbol "void __cdecl chaozhuo(void)" (?chaozhuo@@YAXXZ)

06-02

程序如下:rnrn#includern#includern#includernusing namespace std;rnrnconst int M = 100;rnconst int N = 10;rnint card[M][N+3],card_numble,card_code,card_excess=0; rn //开卡时用作卡号,密码,余额,存储款的变量rnint numble,code,money1,money2,code1; rn //操作时的也是比较的卡号,密码,取钱,存钱,改密码rnchar cardname[M][16],name[16]; rn //姓名和用作比较的姓名rnint z=3,x=0,c=0,v=0,b=0; //每次存取的标志,取的标志,存的标志,写存取次数的标志,排列卡号的标志 rnvoid zhuce();rnvoid chaozhuo();rnvoid close();rnvoid qukuan();rnvoid cunkuan();rnvoid xiugai();rnvoid chaxun();rnint main()rnrnrn char jadge1; //第一次菜单选项标志符rn dorn rn cout<<"********************************\n";rn cout<<"选择你要进行的操作 : \n";rn cout<<"\t1:如果你需要注册 \n";rn cout<<"\t2:如果你已注册,要进行操作 \n";rn cout<<"\t3:关闭系统(数据将全失) \n"; rn cout<<"********************************\n";rn cout<>jadge1;rn switch (jadge1)rn rn case '1':zhuce();break;rn case '2':chaozhuo();break;rn case '3':close();break;rn default:rn cout<<"你搞错了.\n";rn //一次switchrn while(jadge1>0) ; //一次forrn return 0;rnrnrnvoid zhuce()rn if(b>M)rn rn cout<<"卡位已满,不能在申请.\n";rn exit(1);rn rn card_numble=b;rn cout<<"你的卡号是:"<>cardname[card_numble];rn cout<<"输入你设的密码(必须是一串数字):";rn cin>>card_code;rn if(card_code<0)rn rn cout<<"你的密码不合法.\n";rn return ;rn rn elsern rn card[card_numble][1]=card_code;rn rn cout<<"你要存多少钱:";rn cin>>card_excess;rn if(card_excess<=0)rn rn cout<<"\n对不起,您存入的数额不够。\n";rn rn elsern if(card_excess>0)rn rn card[card_numble][2]=card_excess;rn cout<<"你已注册成功.\n";rn rn rnrnrnvoid chaozhou()rnrn char jadge2;rn cout<<"卡号:";rn cin>>numble;rn cout<<"姓名:";rn cin>>name;rn cout<<"密码:";rn cin>>code;rn if((strcmp(name,cardname[numble]))||card[numble][1]!=code)rn rn rn cout<<"你的的姓名或密码不对,还可能是你还没有开卡.\n";rn return ;rn rn elsern rn cout<<"欢迎进入\n";rn while(1)rn rnrn cout<<"----------------------------\n";rn cout<<"请输入你要进行的操作号: \n";rn cout<<"\t1:取款 \n";rn cout<<"\t2:存款 \n";rn cout<<"\t3:修改密码 \n";rn cout<<"\t4:查询当前信用卡情况 \n";rn cout<<"\t5返回 \n";rn cout<<"----------------------------\n";rn cout<N)rn rn cout<<"你进今天操作已满10次,不能再存取款.\n";rn exit(1);rn rn cin>>jadge2;rn switch (jadge2)rn rn case '1':qukuan();rn break;rn case '2':cunkuan();rn break;rn case '3':xiugai();rn break;rn case '4':chaxun();rn break;rn case '5':rn break; //回到开始rn default:rn cout<<"你搞错了.\n";rn //2次switchrn rn //二次forrn return ; rn //if rnrn rnvoid close()rn cout<<"退出"<>money1;rn if(card[numble][2]-money1<0)rn rn cout<<"\n你的余额不够.\n";rn return ;rn rn elsern if(card[numble][2]-money1>=0)rn rn card[numble][2]=card[numble][2]-money1;rn card[numble][z]=0-money1;rn z=z+1;rn x=x+1;rn cout<<"ok\n";rn return ;rn rnrnrnvoid cunkuan()rn rn cout<<"你要存多少钱:";rn cin>>money2;rn if(money2<=0)rn rn cout<<"对不起,您的存款不够。?\n";rn return ;rn rn elsern rn card[numble][2]=card[numble][2]+money2;rn card[numble][z]=money2;rn z=z+1;rn c=c+1;rn cout<<"ok\n";rn return ;rn rnrnrnvoid xiugai()rn rn cout<<"你想要得新密码是(必须是一串数字):";rn cin>>code1;rn if(code1<0)rn rn cout<<"你的密码不合法.\n";rn return ;rn rn elsern rn card[numble][1]=code1;rn cout<<"ok\n";rn return ;rn rnrnrnvoid chaxun()rnrn cout<<"---------------------------------------"<

wdk编译出错LNK2019:unresolved external symbol _DriverEntry@8 referenced in function

05-29

inline hook ObReferenceObjectByHandle保护进程,看雪上的例子,c语言写的,编译错误LNK2019:unresolved external symbol _DriverEntry@8 referenced in function _GsDriverEntry@8。rnrn#include rn#include rnrnrnrnBYTE OriginalBytes[5]=0; rnBYTE JmpAddress[5]=0xE9,0,0,0,0;rnULONG CR0VALUE;rnrnextern POBJECT_TYPE *PsProcessType;rnrnrnNTSTATUS ObReferenceObjectByHandle(rn __in HANDLE Handle,rn __in ACCESS_MASK DesiredAccess,rn __in_opt POBJECT_TYPE ObjectType,rn __in KPROCESSOR_MODE AccessMode,rn __out PVOID *Object,rn __out_opt POBJECT_HANDLE_INFORMATION HandleInformationrn);rnrnNTSTATUS MidObReferenceObjectByHandle(rn __in HANDLE Handle,rn __in ACCESS_MASK DesiredAccess,rn __in_opt POBJECT_TYPE ObjectType,rn __in KPROCESSOR_MODE AccessMode,rn __out PVOID *Object,rn __out_opt POBJECT_HANDLE_INFORMATION HandleInformationrn);rnrnInlineHook()rnrn KIRQL Irql;rn rn DbgPrint("Original ObReferenceObjectByHandle Address is 0x%x",ObReferenceObjectByHandle);rn //保存原函数前5字节rn RtlCopyMemory(rn __in OriginalBytes,rn __in ObReferenceObjectByHandle,rn __in 5);rn*(BYTE*)JmpAddress=(ULONG)MidObReferenceObjectByHandle-(ULONG)ObReferenceObjectByHandle+5;rnrn//关闭内存写保护rn _asm rn rn rn push eaxrn rn mov eax, cr0 rn mov CR0VALUE, eax rn and eax, 0fffeffffh rn mov cr0, eaxrn pop eaxrn rn rn Irql=KeRaiseIrqlToDpcLevel();rnRtlCopyMemory(rn __in (BYTE*)ObReferenceObjectByHandle,rn __in JmpAddress,rn __in 5rn);rn KeLowerIrql(Irql);rn rn//开启内存写保护 rn __asmrn rn rn rn push eaxrn rn mov eax, CR0VALUE rn rn mov cr0, eaxrn rn pop eaxrn rn rnrnrnrn_declspec (naked) NTSTATUS OriginalObReferenceObjectByHandle(rn __in HANDLE Handle,rn __in ACCESS_MASK DesiredAccess,rn __in_opt POBJECT_TYPE ObjectType,rn __in KPROCESSOR_MODE AccessMode,rn __out PVOID *Object,rn __out_opt POBJECT_HANDLE_INFORMATION HandleInformationrn)rnrn _asmrn mov edi,edirn push ebprn mov ebp,esprn mov eax,ObReferenceObjectByHandlern add eax,5rn jmp eaxrn rn rnrnNTSTATUS MidObReferenceObjectByHandle(rn __in HANDLE Handle,rn __in ACCESS_MASK DesiredAccess,rn __in_opt POBJECT_TYPE ObjectType,rn __in KPROCESSOR_MODE AccessMode,rn __out PVOID *Object,rn __out_opt POBJECT_HANDLE_INFORMATION HandleInformationrn)rnrn NTSTATUS status;rn status=OriginalObReferenceObjectByHandle(Handle,DesiredAccess,ObjectType,AccessMode,Object,HandleInformation);rn if(status==STATUS_SUCCESS&&DesiredAccess==0x0001)rn rn if(ObjectType==*PsProcessType)rn rn if(_stricmp((char*)((ULONG)(*Object)+0x174),"notepad.exe")==0)rn rn ObDereferenceObject(*Object);rn return STATUS_INVALID_HANDLE;rn rn rn rn return status;rnrnrnrnInlineUnHook()rnrn KIRQL Irql;rn _asmrn rn rn rn push eaxrn rn mov eax, cr0 rn rn mov CR0VALUE, eax rn rn and eax, 0fffeffffh rn rn mov cr0, eaxrn rn pop eaxrn rn rn Irql=KeRaiseIrqlToDpcLevel();rnrn RtlCopyMemory((BYTE*)ObReferenceObjectByHandle,OriginalBytes,5);rn rn KeLowerIrql(Irql);rn rn //开启写保护rn rn __asmrn rn rn rn push eaxrn mov eax, CR0VALUE rn mov cr0, eaxrn rn pop eaxrn rn rnrnrnrnrnUnload(PDRIVER_OBJECT dricer)rnrn InlineUnHook();rn DbgPrint("Driver is Unloaded...\r\n");rnrnrn NTSTATUS DriverEmpty(PDRIVER_OBJECT driver,PUNICODE_STRING reg_string)rnrn InlineHook();rn driver->DriverUnload=Unload;rnrn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试