Exemplo n.º 1
0
        /// <summary>
        /// int FindUserData(DWORD productID, DWORD pluginID, const char *identifier, int userdata_type)
        /// </summary>
        public int FindUserData(uint productID, uint pluginID, string identifier, int userdata_type)
        {
            BeforeFindUserData(productID, pluginID, identifier, userdata_type);

            var info = new UserDataInfo
            {
                dwSize          = (uint)Marshal.SizeOf(typeof(UserDataInfo)),
                ProductID       = productID,
                PluginID        = pluginID,
                Identifier      = Plugin.Get932(identifier).Take(15).Concat(new byte[] { 0 }).ToArray(),
                UserdataType    = userdata_type,
                BytesPerElement = 0,
            };

            return(NativeMethods.MQDoc_CreateUserData(this, ref info));
        }
Exemplo n.º 2
0
		/// <summary>
		/// int FindUserData(DWORD productID, DWORD pluginID, const char *identifier, int userdata_type)
		/// </summary>
		public int FindUserData(uint productID, uint pluginID, string identifier, int userdata_type)
		{
			BeforeFindUserData(productID, pluginID, identifier, userdata_type);

			var info = new UserDataInfo
			{
				dwSize = (uint)Marshal.SizeOf(typeof(UserDataInfo)),
				ProductID = productID,
				PluginID = pluginID,
				Identifier = Plugin.Get932(identifier).Take(15).Concat(new byte[] { 0 }).ToArray(),
				UserdataType = userdata_type,
				BytesPerElement = 0,
			};

			return NativeMethods.MQDoc_CreateUserData(this, ref info);
		}