IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.68 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-17
[20:46]<d0`>yes
[20:46]<d0`>When I open dependency checker I see something odd for that function thou
[20:46]<gjrvcxnne>what are teh defines for HDAPU and HDAPIENTRY?
[20:46]<d0`>__stdcall __declspec(dllimport)
[20:47]<svzz[wjzc]>hey what's the "common standard" for the second Typename in a generic declaration ? (the first being T)
[20:47]<mjzymygo>>_0
[20:47]<d0`>GoatCheez the ORDINAL of hdGetError() is 11 (0x000B) the Hint is 11
[20:47]<wjzc_dnvzfnzf>hello, I'm trying a simple interface example from "Learning C#" and the compiler is not picking up on my implementation of the interface's methods. Any help is appreciated: http://rafb.net/paste/results/0QR4p082.html
[20:48]<d0`>GoatCheez: but the function name is like this: _hdGetError@0
[20:48]<sdnffdxdlld>matt: I'm acctually starting to look foreward to the T-SQL as its easier to get working than the fricking VS intergration :S :(
[20:48]<d0`>work_metaperl why your interfacing IConvertable?
[20:48]<mjzymygo>smellyhippy: I have no doubt. but i'm doing some pretty complicated N-Node tree work here...
[20:48]<gjrvcxnne>`m0: it looks fine.... only thing i can really suggest at this point is to try to not use the entry point, and to try and use a byte array the size of the struct for the return value, and see what's in that when you call the func...
[20:49]<d0`>hmm
[20:49]<d0`>how would I specify the byte array?
[20:49]<sdnffdxdlld>yer deep logic structures suck where ever you have to do them ^_^
[20:49]<maxgg>Moridin8: it's a royal pain isn't it
[20:49]<vufvuzn>work_metaperl: the mehtod in your interface takes no parameters - you haven't implemented _that_ method
[20:49]<vufvuzn>you 've implemented some other method that takes a string parameter
[20:49]<wjzc_dnvzfnzf>m0`, what do you mean? that is what the book said... oh I see
[20:49]<wjzc_dnvzfnzf>vulture, thanks
[20:49]<wjzc_dnvzfnzf>:)
[20:49]<gjrvcxnne>m0`: it looks like it's 12 bytes to me, so just do byte[12] data;
[20:50]<sdnffdxdlld>bbiab - fooood
[20:50]<gjrvcxnne>add anopther 4 bytes for padding though... can't hurt
[20:50]<vufvuzn>(and you have return values from a "void" function..)
[20:50]<d0`>GoatCheez: I took out the entry point now it says Entrypooint not found exception
[20:50]<gjrvcxnne>you have to replace it with the name, you can't just take that line out. that line was the only line telling C# where to find the function
[20:50]<d0`>My first problem, around 3 weeks ago was that function :p
[20:51]<mjzymygo>dchen: yeh... especially when you have to be able to allow the user to go back up the tree and then go down another route - which of course needs previous route destroying...
[20:51]<d0`>it shoudl do it automatically
[20:51]<gjrvcxnne>m0`: the dll name is hd.dll?
[20:52]<d0`>yes
[20:52]<d0`>All other functions working fine
[20:52]<gjrvcxnne>and you have the function name spelled right?
[20:52]<d0`>onyl this function acting crazy
[20:52]<d0`> [DllImport("hd", EntryPoint = "hdGetError")]
[20:52]<gjrvcxnne>oh wait, i know
[20:52]<d0`>yes same as I pasted
[20:52]<gjrvcxnne>take out , EntryPoint = "hdGetError"
[20:52]<d0`>i did
[20:53]<gjrvcxnne>and it can't find it/
[20:53]<gjrvcxnne>?
[20:53]<d0`>I need to do it wrt to Ordinal
[20:53]<d0`>no it can't
[20:53]<d0`>[DllImport("hd", EntryPoint = "#11")]
[20:53]<d0`>i need to do it like this
[20:53]<gjrvcxnne>ok, well, the dll names were mangled then...
[20:53]<d0`>yes they are manglesd
[20:53]<d0`>stupid Sensable
[20:53]<d0`>[DllImport("hd", EntryPoint = "_hdGetError@0")]
[20:54]<d0`>I had to do this to make it recognize it
[20:54]<gjrvcxnne>try the byte array
[20:54]<d0`>same thing of doing [DllImport("hd", EntryPoint = "#11")]
[20:54]<d0`>where do I place the byte array?
[20:54]<gjrvcxnne>use it for the return value
[20:54]<gjrvcxnne>instead of the sctruct
[20:55]<d0`>hmm
[20:55]<d0`>how would I access the members?
[20:55]<gjrvcxnne>we don't... we are doing this for experimentation purposes, to see what data the functino returns...
[20:55]<gjrvcxnne>then we can determine what to specify the struct as
[20:55]<d0`>GoatCheez it is kinda wierd, if I have no error, it returns no error, but when I ahve a error it gives me trhe wrong error
[20:56]<d0`>public static extern [MarshalAs(UnmanagedType.LPArray, SizeConst = 12)] byte[] hdGetError();
[20:56]<d0`>Alright did it like that
[20:56]<gjrvcxnne>lol
[20:56]<d0`>?
[20:57]<gjrvcxnne>nothing... just you didn't have to specify the marshalling
[20:57]<d0`>how would I do it then :)
[20:57]<d0`>you can't say byte[12] hdGEtError(0
[20:57]<gjrvcxnne>just byte[]
[20:58]<gjrvcxnne>oh hmmmm does it let you? bah... either way
[20:58]<d0`>what do I have to test for?
[20:58]<gjrvcxnne>define an array, and assign the return value to that function call to that array (byte[] data = hdGetError();)
[20:58]<gjrvcxnne>set a breakpoint for the next line
[20:59]<gjrvcxnne>since it's returning the error number wrong, make the function return an error, and then spit out the array contents here, and what the error value should be
[21:00]<d0`>Marshal Exception
[21:01]<d0`>Cannot marshal 'return value': Invalid managed/unmanaged type combination.
[21:01]<gjrvcxnne>it won't let you just do byte[] ?
[21:01]<d0`>i don't think so
[21:01]<gjrvcxnne>try it
[21:01]<d0`>Cannot marshal 'return value': Invalid managed/unmanaged type combination.
[21:02]<d0`>the return value of the types do not match
[21:02]<gjrvcxnne>brb... meeting...
[21:02]<d0`>ok :)
[21:03]<lyfuym-wjzc>whohaaaaa
[21:03]<lyfuym-wjzc>I check on one of my torrent running
[21:03]<lyfuym-wjzc>and the percent complete is 66.6
[21:03]<lyfuym-wjzc>eish
[21:04]<sdnffdxdlld>lol
[21:04]<d0`>lol
[21:04]<lyfuym-wjzc>smellyhippy I am going to use DataTables
[21:04]<lyfuym-wjzc>it will make it easier for databinding
[21:05]<sdnffdxdlld>uh huh
[21:05]<mjzymygo>databinding == baaaad... mmkay
[21:06]<lyfuym-wjzc>Moridin8 to datagridvies
[21:06]<lyfuym-wjzc>views even
[21:06]<lyfuym-wjzc>comboboxes
[21:06]<lyfuym-wjzc>etc...
[21:06]<lyfuym-wjzc>its fine







