DirectInput8Create

Creates a DirectInput object and returns an IDirectInput8 Interface or later interface.

				HRESULT 
				DirectInput8Create(
				HINSTANCE
				hinst
				,
				DWORD
				dwVersion
				,
				REFIID
				riidltf
				,
				LPVOID *
				ppvOut
				,
				LPUNKNOWN
				punkOuter
				);
		
Parameters
hinst
Instance handle to the application or dynamic-link library (DLL) that is creating the DirectInput object. DirectInput uses this value to determine whether the application or DLL has been certified and to establish any special behaviors that might be necessary for backward compatibility. It is an error for a DLL to pass the handle to the parent application. For example, an Microsoft ActiveX control embedded in a Web page that uses DirectInput must pass its own instance handle, and not the handle to the browser. This ensures that DirectInput recognizes the control and can enable any special behaviors that might be necessary.
dwVersion
Version number of DirectInput for which the application is designed. This value is normally DIRECTINPUT_VERSION. If the application defines DIRECTINPUT_VERSION before including Dinput.h, the value must be greater than 0x0800. For earlier versions, use DirectInputCreateEx, which is in Dinput.lib.
riidltf
Unique identifier of the desired interface. This value is IID_IDirectInput8A or IID_IDirectInput8W. Passing the IID_IDirectInput8 define selects the ANSI or Unicode version of the interface, depending on whether UNICODE is defined during compilation.
ppvOut
Address of a pointer to a variable to receive the interface pointer if the call succeeds.
punkOuter
Pointer to the address of the controlling object's IUnknown interface for COM aggregation, or NULL if the interface is not aggregated. Most calling applications pass NULL. If aggregation is requested, the object returned in ppvOut is a pointer to  IUnknown, as required by COM aggregation.
Return Values

If the function succeeds, the return value is DI_OK. If the function fails, the return value can be one of the following error values: DIERR_BETADIRECTINPUTVERSION, DIERR_INVALIDPARAM, DIERR_OLDDIRECTINPUTVERSION, DIERR_OUTOFMEMORY.

Remarks

The DirectInput object created by this function is implemented in Dinput8.dll. Versions of interfaces earlier than DirectX 8.0 cannot be obtained in this implementation.

To create a DirectX 8.x interface with the latest DirectX SDK without using CoCreateInstance:

  1. Set "#define DIRECTINPUT_VERSION 0x0800" before the include statement for Dinput8.h.
  2. Call DirectInput8Create instead of DirectInputCreateEx.
  3. Link to the Dinput8.lib library instead of Dinput.lib.

To create a DirectX 8.x interface with the DirectX 8.x SDK without using CoCreateInstance:

  1. Call DirectInput8Create instead of DirectInputCreateEx.
  2. Link to the Dinput8.lib library instead of Dinput.lib.

To create a DirectX 7.0 interface from the DirectX 8.x or latest DirectX SDK without using CoCreateInstance:

  1. Set "#define DIRECTINPUT_VERSION 0x0700" before the include statement for dinput.h.
  2. Call DirectInputCreateEx instead of DirectInput8Create.
  3. Link to the Dinput.lib library instead of Dinput8.lib.

To create a DirectX 7.0 interface from the DirectX 8.x or latest DirectX SDK using CoCreateInstance:

  1. Call CoInitializeEx.
  2. Call CoCreateInstance using CLISID_DirectInput.
  3. Use IDirectInput7::Initialize to initialize the DirectInput object.

To create a DirectX 8.x or DirectX 9.0 interface from the DirectX 8.x or latest DirectX SDK using CoCreateInstance:

  1. Call CoInitializeEx.
  2. Call CoCreateInstance using CLISID_DirectInput8.
  3. Use Initialize to initialize the DirectInput object.

Calling the function with pUnkOuter = NULL is equivalent to creating the object through CoCreateInstance( &CLSID_DirectInput8, punkOuter, CLSCTX_INPROC_SERVER, &IID_IDirectInput8W, lplpDirectInput), then initializing it with Initialize.

Calling the function with pUnkOuter != NULL is equivalent to creating the object through CoCreateInstance( &CLSID_DirectInput8, punkOuter, CLSCTX_INPROC_SERVER, &IID_IUnknown, lplpDirectInput). The aggregated object must be initialized manually.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
{"method":"/algo/result","request":"{"user_input_params":{"cur_hour":"'1000'","limit_offset":"0","limit_size":"500","cur_day":"'20230605'"},"version":"main","tid":"generate_direct_purchase_task_v2","sid":"OMS"}","dsl":"cluster:bigdata GET store_product_auto_purchase_hourly/_search { "size" : 0, "query" : { "bool" : { "filter" : [ { "bool" : { "must" : [ { "term" : { "cur_day" : { "value" : "20230605", "boost" : 1.0 } } }, { "term" : { "cur_hour" : { "value" : "1000", "boost" : 1.0 } } } ], "adjust_pure_negative" : true, "boost" : 1.0 } } ], "adjust_pure_negative" : true, "boost" : 1.0 } }, "_source" : { "includes" : [ ], "excludes" : [ ] }, "aggregations" : { "result" : { "composite" : { "size" : 10000, "sources" : [ { "supplier_id" : { "terms" : { "field" : "supplier_id", "missing_bucket" : false, "order" : "asc" } } }, { "city_zip" : { "terms" : { "field" : "city_zip", "missing_bucket" : false, "order" : "asc" } } }, { "city_order_create_type" : { "terms" : { "field" : "city_order_create_type", "missing_bucket" : false, "order" : "asc" } } }, { "city_order_create" : { "terms" : { "field" : "city_order_create", "missing_bucket" : false, "order" : "asc" } } }, { "city_order_confirm_end" : { "terms" : { "field" : "city_order_confirm_end", "missing_bucket" : false, "order" : "asc" } } }, { "supply_model" : { "terms" : { "field" : "supply_model", "missing_bucket" : false, "order" : "asc" } } }, { "dc_store_delivery_start_time" : { "terms" : { "field" : "dc_store_delivery_start_time", "missing_bucket" : false, "order" : "asc" } } }, { "plan_sale_base_start" : { "terms" : { "field" : "plan_sale_base_start", "missing_bucket" : false, "order" : "asc" } } }, { "rule_detail_type" : { "terms" : { "field" : "rule_detail_type", "missing_bucket" : false, "order" : "asc" } } }, { "delivery_waves" : { "terms" : { "field" : "delivery_waves", "missing_bucket" : false, "order" : "asc" } } } ] }, "aggregations" : { "r_bucket_sort" : { "bucket_sort" : { "sort" : [ ], "from" : 0, "size" : 500, "gap_policy" : "SKIP" } } } } }}","total":0,"result":"[]"} 将上面的json转化为python字典
最新发布
06-06

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值