当前位置: 首页 > news >正文

连云港做网站优化wordpress删掉不需要的

连云港做网站优化,wordpress删掉不需要的,关键词优化怎么做,h5网站开发概述#xff1a;windows 创建 RPC调用过程实例详解 参考文章#xff1a;Remote procedure call (RPC)#xff08;远程过程调用 (RPC)#xff09; - Win32 apps | Microsoft Learn 文章目录 0x01、生成 UUID 和模版(IDL)文件0x02、添加 acf 文件0x03、编译 idl 文件0x04、客… 概述windows 创建 RPC调用过程实例详解 参考文章Remote procedure call (RPC)远程过程调用 (RPC) - Win32 apps | Microsoft Learn 文章目录 0x01、生成 UUID 和模版(IDL)文件0x02、添加 acf 文件0x03、编译 idl 文件0x04、客户端main.cpp 0x05、服务端main.cpp 0x06、编译并运行0x07、运行示例ClientServer 0x01、生成 UUID 和模版(IDL)文件 定义接口的第一步是使用 uuidgen 实用工具生成通用唯一标识符UUID。UUID使客户端和服务端能够相互识别。该工具包含在阿庄平台软件开发工具包中SDK。 一般安装路径位于D:\Windows Kits\10\bin\10.0.22621.0\x64 以下命令生成 UUID 并创建名为 Hello.idl 的模版文件。 uuidgen /i /ohello.idl模版内容大致如下 [uuid(7a98c250-6808-11cf-b73b-00aa00b677a7),version(1.0) ] interface hello {}在模版中添加接口 //file hello.idl [uuid(7a98c250-6808-11cf-b73b-00aa00b677a7),version(1.0) ] interface hello {void HelloProc([in, string] unsigned char * pszString);void Shutdown(void); }0x02、添加 acf 文件 acf文件内容如下所示导出接口需要与 idl 文件一致 //file: hello.acf [implicit_handle (handle_t hello_IfHandle) ] interface hello { }0x03、编译 idl 文件 打开 visual studio新建一个空项目 空项目中添加上述 idl文件 和 acf文件 编译项目 生成 hello_h.h、hello_c.c、hello_s.c hello_h.h: 服务端和客户端共用文件hello_c.c: 客户端文件hello_s.c: 服务端文件 需要补充说明的是在 hello_h.h 头文件中有两个导出接口导出接口即为rpc调用的接口。 extern RPC_IF_HANDLE hello_v1_0_c_ifspec; extern RPC_IF_HANDLE hello_v1_0_s_ifspec;0x04、客户端 新建工程文件如下所示 main.cpp //client.cpp #include iostream #include string using namespace std;#include hello_h.h#pragma comment(lib,Rpcrt4.lib)void doRpcCall();int main(int argc, char** argv) {int i 0;RPC_STATUS status 0;unsigned char* pszNetworkAddr NULL;unsigned char* pszStringBinding NULL;for (i 1; i argc; i) {if (strcmp(argv[i], -ip) 0) {pszNetworkAddr (unsigned char*)argv[i];break;}}status RpcStringBindingCompose(NULL,(unsigned char*)ncacn_np,pszNetworkAddr,(unsigned char*)\\pipe\\hello,NULL,pszStringBinding);if (status ! 0) {cout RpcStringBindingCompose returns: status ! endl;return -1;}cout pszStringBinding pszStringBinding endl;status RpcBindingFromStringBinding(pszStringBinding, hello_IfHandle);if (status ! 0) {cout RpcBindingFromStringBinding returns: status ! endl;return -1;}doRpcCall();status RpcStringFree(pszStringBinding);if (status ! 0)cout RpcStringFree returns: status ! endl;status RpcBindingFree(hello_IfHandle);if (status ! 0)cout RpcBindingFree returns: status ! endl;cin.get();return 0; }void doRpcCall(void) {char buff[1024];RpcTryExcept{while (true) {cout Please input a string param for Rpc call: endl;cin.getline(buff, 1023);if (strcmp(buff, exit) 0 || strcmp(buff, quit) 0) {Shutdown();}else {HelloProc((unsigned char*)buff);cout call helloproc succeed! endl;}}}RpcExcept(1) {unsigned long ulCode RpcExceptionCode();cout RPC exception occured! code: ulCode endl;}RpcEndExcept }void* __RPC_USER MIDL_user_allocate(size_t len) {return (malloc(len)); }void __RPC_USER MIDL_user_free(void* ptr) {free(ptr); }0x05、服务端 新建工程文件如下所示 main.cpp #include iostream using namespace std;#include hello_h.h#pragma comment(lib,Rpcrt4.lib)int main(void) {RPC_STATUS status 0;unsigned int mincall 1;unsigned int maxcall 20;status RpcServerUseProtseqEp((unsigned char*)ncacn_np,maxcall,(unsigned char*)\\pipe\\hello,NULL);if (status ! 0) {cout RpcServerUseProtseqEp returns: status endl;return -1;}status RpcServerRegisterIf(hello_v1_0_s_ifspec,NULL,NULL);if (status ! 0) {cout RpcServerRegisterIf returns: status endl;return -1;}cout Rpc Server Begin Listening... endl;status RpcServerListen(mincall, maxcall, FALSE);if (status ! 0) {cout RpcServerListen returns: status endl;return -1;}cin.get();return 0; }/************************************************************************/ /* MIDL malloc free */ /************************************************************************/void* __RPC_USER MIDL_user_allocate(size_t len) {return (malloc(len)); }void __RPC_USER MIDL_user_free(void* ptr) {free(ptr); }/************************************************************************/ /* Interfaces */ /************************************************************************/void HelloProc(unsigned char* szhello) {cout szhello endl; }void Shutdown(void) {RPC_STATUS status 0;status RpcMgmtStopServerListening(NULL);if (status ! 0) {cout RpcMgmtStopServerListening returns: status ! endl;}status RpcServerUnregisterIf(NULL, NULL, FALSE);if (status ! 0) {cout RpcServerUnregisterIf returns: status ! endl;} }0x06、编译并运行 分别编译客户端和服务端程序得到 server.exe 和 client.exe 先运行 server.exe在 client.exe 目录运行 client -ip 192.168.106.128 来启动客户端程序并与服务器端相连在 client 的窗口输入任意字符串回车后可看到server窗口上有显示在 client 窗口内 输入 exit 或 quit, server 窗口关闭 0x07、运行示例 Client Server
http://www.dnsts.com.cn/news/45088.html

相关文章:

  • 在站点上新建网页做网站开发注册工商户可以么
  • 可以直接进入的正能量网站老狼网站建设 技术规范书
  • 失业保险网站wordpress 获取用户邮箱
  • 国外游戏ui设计网站wordpress define
  • 建设工程安全备案网站织梦猫免费模板
  • 淘宝做图片的网站django网站开发源代码
  • 万网网站后台留言在哪南充房管局官网
  • 没有公司自己做网站null wordpress theme
  • 厦门网站建设公司哪家好黑龙江能建公司官网
  • 类似稿定设计的网站网站建设装修
  • 扁平化设计风格的网站用php做视频网站的步骤
  • 申请网站就是做网站吗城乡建设行业证书查询
  • 广州网站设计首选刻百度 移动网站优化
  • 网页设计制作实训总结网站架构优化 amp
  • 新手自己建设一个网站wordpress 回复邮件
  • 织梦做的网站织梦修改网页模板学生静态网页模板
  • 黑龙江学校网站建设网站服务器检测
  • 烟台有没有做网站wordpress论坛源码
  • 自己 做网站学什么 平面设计下载安装微信
  • 石家庄seo网站优化电话网站编辑工具软件
  • 网站模板颜色最大的房产网站
  • 2017年网站建设高职考f卷wordpress 地图html代码
  • 简单网站模板下载自己电脑做服务器上传网站 需要备案吗
  • 优秀的电商设计网站有哪些谷歌搜索入口 镜像
  • 建网站的经历页面设计风格有哪几种
  • 做渠道的网站有哪些视频类html网站模板
  • 长沙县好的建站按效果付费中国小康建设官方网站
  • 做网站用php还是jsp做游戏网站在哪里找
  • 金阊公司网站建设电话中国建设银行app官方下载
  • 网站策划岗位职责2017做网站怎么赚钱