Some stuff since I'm bored... menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 16 of 16
  1. #16
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    I've hooked Framescript_SignalEvents succesfully, but my methods to do so are very alarming. (It screams YOUR DOIN IT WRONG)

    Code:
            [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
            protected delegate int Framescript_SignalEvent(int Event, IntPtr pFormat, SArguments Args);
    pFormat points to a string that contains the formatting for the passed arguments, seperated by the % char. (Example: %s%d%d%s%f would indicate 5 arguments: String Int Int String Double)
    If it's null, there obviously aren't any arguments to that event.

    SArguments is... and brace your self for ugly:

    Code:
                [StructLayout(LayoutKind.Sequential)]
                public struct SArguments
                {
                    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 14)]
                    public uint[] Arguments;
                }
    Believe me when I say this really was my last resort.
    Ah... one of the fun nuances of .NET

    .NET doesn't really support the native va_list. (It does, to some extent, but it's a real bitch to work with)

    Your best bet would be something like:

    public delegate int FrameScript_SignalEventDelegate(int eventId, string arguments, IntPtr vaList);

    Then iterating the 'vaList' as if it were a pseudo-array. I'm fairly sure UFP delegates can't use the 'params object[] args' approach, though I may be wrong. (Worth testing?)

    Some stuff since I'm bored...
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Need help with some stuff
    By jordy in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 06-14-2008, 04:17 AM
  2. Help with some stuff plz
    By Minichili in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 04-03-2008, 12:56 PM
  3. [Collection]Some Stuff from my HD
    By Grindelo in forum World of Warcraft Model Editing
    Replies: 1
    Last Post: 01-21-2008, 11:00 AM
  4. [Spell Swaps] Pally spells to some stuff
    By mmmyowned in forum World of Warcraft Model Editing
    Replies: 0
    Last Post: 12-06-2007, 09:49 PM
  5. Need some stuff for private server
    By xredzx01 in forum World of Warcraft General
    Replies: 2
    Last Post: 08-11-2006, 06:31 PM
All times are GMT -5. The time now is 09:42 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search