Skip to content

获取对象数量 - XmlGetObjectCount

函数简介

获取当前管理的XML对象数量(调试用)。

接口名称

XmlGetObjectCount

DLL调用

c
int32_t XmlGetObjectCount();

参数说明

参数名类型说明
--。

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
int32_t count = ola.XmlGetObjectCount();
csharp
using OLAPlug;

var ola = new OLAPlugServer();
int count = ola.XmlGetObjectCount();
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
count = ola.XmlGetObjectCount()
java
import com.olaplug.OLAPlugServer;
import com.sun.jna.ptr.IntByReference;

OLAPlugServer ola = new OLAPlugServer();
int count = ola.XmlGetObjectCount();
cpp
var ola = com("OlaPlug.OlaSoft")
var count = ola.XmlGetObjectCount()
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
count = ola.XmlGetObjectCount()
text
.局部变量 ola, OLAPlug
ola.创建 ()
count = ola.XmlGetObjectCount ()
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var count = ola.XmlGetObjectCount();
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
整数 count = ola.XmlGetObjectCount()
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
int32_t count = ola.XmlGetObjectCount();

原生 DLL 调用

cpp
long instance = CreateCOLAPlugInterFace();
int count = XmlGetObjectCount(instance);
csharp
using System.Runtime.InteropServices;
using System.Text;

[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern long CreateCOLAPlugInterFace();

long instance = CreateCOLAPlugInterFace();
int count = XmlGetObjectCount(instance);
python
from ctypes import CDLL, c_int, c_int64, create_string_buffer

ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
count = ola.XmlGetObjectCount(instance)

返回值

返回值说明
(返回值)返回当前管理的XML对象数量。

注意事项

项目说明
用于调试和内存泄漏检测用于调试和内存泄漏检测。
包括所有未释放的XML文档对象包括所有未释放的XML文档对象。
正常情况下正常情况下,程序结束时应该为0。