Hi,
I'm trying to use use the LoadInk method of an mathinputcontrol but I can't figure out where to create the IIDispInk object from, as it just appears to be an interface.
http://msdn.microsoft.com/en-us/library/dd372605(VS.85).aspx
Any guidance would be highly appreciated.
Thanks :)
Edit: for clarity, here is my code so far [edit 2: by "so far", I mean of what's been added. Pretty much all the rest of my code can be found on SO under how to create the MIC in C#] (thanks to Hans Passant)
MSINKAUTLib.InkDispClass loadInkTest = new MSINKAUTLib.InkDispClass();
Stream stream = File.Open("C:\\Tim\\bytes.isf", FileMode.Open);
byte[] bytes = new byte[stream.Length];
stream.Read(bytes, 0, bytes.Length);
loadInkTest.Load(bytes);
ctrl.LoadInk((micautLib.IInkDisp)loadInkTest);
Unfortunately this throws exactly the same exception
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
C:\Tim\bytes.isf contain bytes saved from an InkPicture control which loads and saves this file file OK, so I assume that because the loadInkTest.Load() method did not throw an exception (normally it is not shy to do so) that it loaded the data OK. If there is a suggestion on a better (or more obvious) place to get the bytes, please let me know.