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-27
[13:25]<mjzymygo>use C++/CLI, not managed C++
[13:27]<lyzxvxzddnz>Moridin8 : Need the Physical Address to a variable i use ?
[13:27]<lyzxvxzddnz>&VarName ?
[13:27]<mjzymygo>lighthammer... under what circumstances
[13:27]<lyzxvxzddnz>managed Code
[13:27]<rsdj>Moridin8: WHat is the difference?
[13:27]<mjzymygo>is it a field?
[13:28]<lyzxvxzddnz>yeah
[13:28]<mjzymygo>amso: lots
[13:28]<mjzymygo>not a local parameter?
[13:28]<lyzxvxzddnz>no
[13:28]<lyzxvxzddnz>bitmap in memory
[13:28]<mjzymygo>why do you need it (before I start showing you how to mess with pointers)
[13:29]<lyzxvxzddnz>i know about pointers
[13:29]<rsdj>Moridin8: Isen't C++/CLI managed c++ with VC++?
[13:29]<lyzxvxzddnz>addressof will not in this instance
[13:29]<mjzymygo>if it's a bit map, wouldn't MemoryStream be better?
[13:29]<rsdj>Anyway, that should not be the couse the this problem
[13:29]<mjzymygo>asmo: no... Managed C++ and C++/CLI are different beasts
[13:29]<lyzxvxzddnz>eg :
[13:30]<lyzxvxzddnz>static void Main() {
[13:30]<lyzxvxzddnz> int i;
[13:30]<lyzxvxzddnz> unsafe {
[13:30]<lyzxvxzddnz> int* p = &i;
[13:30]<lyzxvxzddnz> *p = 123;
[13:30]<lyzxvxzddnz> }
[13:30]<mjzymygo>erm.. pastebin
[13:30]<lyzxvxzddnz>sorry
[13:30]<mjzymygo>ah... and you want to do the same with a field?
[13:30]<lyzxvxzddnz>;)
[13:30]<mjzymygo>fixed(){}
[13:30]<mjzymygo>^^^
[13:30]<lcs>why do you want to use pointers?
[13:30]<rsdj>MOridin8: Well, I compile it with /clr
[13:30]<lyzxvxzddnz>i dont
[13:31]<rsdj>in VC++ 2005 Express, should be C++/CLI
[13:31]<mjzymygo>asmo... yeh, thats C++/CLI ;)
[13:31]<lyzxvxzddnz>i want to get the Address of it
[13:31]<mjzymygo>look at the fixed construct
[13:31]<rsdj>First project I do with it actually, usally use C# and C++ seperated
[13:31]<rsdj>Anyway, any idea of what can couse a problem like this?
[13:31]<lyzxvxzddnz>Moridin8 : Cool
[13:32]<rsdj>Compiled it run fine
[13:32]<rsdj>but the designer complains about the assembly
[13:34]<lyzxvxzddnz>moridin8 : that & is it == the address of that variable no ?
[13:34]<rsdj>Yes
[13:34]<mjzymygo>fixed(int* pntrThing = &this._AField)
[13:34]<mjzymygo> *pntrThing = 20;
[13:34]<mjzymygo>^^^ assumes the field is an int
[13:35]<lyzxvxzddnz>ahhhhh
[13:35]<mjzymygo>Lighthammer: you have to pin stuff like fields so the GC won't move it around.
[13:36]<mjzymygo>fixed(){} does that
[13:36]<lyzxvxzddnz>so it acts like a const declaration ?
[13:37]<lyzxvxzddnz>sort of
[13:37]<lyzxvxzddnz>does it reserve this space indefinately or will JIT garbage collect it
[13:37]<mjzymygo>no. it the address of the field changes during GC generations. you need to tell the GC to stop moving your field for the duration of the need to use the pointer
[13:37]<mjzymygo>fixed does that.
[13:38]<mjzymygo>and you define the pointer within the () part so the GC knows why
[13:38]<mjzymygo>the moment the fixed(){} goes out of scope, the GC can legitamatly collect the field and move it about again
[13:38]<mjzymygo>you should keep all fixed(){} operations to a minimum
[13:38]<lyzxvxzddnz>ok .. goit it thanks ..
[13:39]<lyzxvxzddnz>so there is no way to indefinatley assign that value as static
[13:39]<mjzymygo>no
[13:39]<lyzxvxzddnz>cool
[13:39]<lyzxvxzddnz>coke is kicking in now :)
[13:39]<lyzxvxzddnz>thanks Moridin ... salute
[13:40]<mjzymygo>give me a moridin8++ ;)
[13:40]<lyzxvxzddnz>lol
[13:40]<mjzymygo>ah shit... no SpikeLite
[13:42]<lyzxvxzddnz>;P
[14:00]<fyfuym-syfggag>ok that was fucked up
[14:00]<fyfuym-syfggag>I just got ass raped in starcraft
[14:00]<fyfuym-syfggag>god dammit
[14:01]<fyfuym-syfggag>by a chick :(
[14:03]<mjzymygo>^^^ haha!
[14:03]<fyfuym-syfggag>god man I had 500+ men
[14:03]<fyfuym-syfggag>30 + siege tanks
[14:03]<fyfuym-syfggag>and she walked into my base like it was a candy store
[14:06]<mjzymygo>never played it. but sounds like she opened up a can of serious whoop ass on you and set to you with a big fat dildo
[14:07]<fyfuym-syfggag>Moridin8 its like warcraft
[14:07]<fyfuym-syfggag>but its in space
[14:07]<mjzymygo>um... haven't played that either ;)
[14:07]<fyfuym-syfggag>erm command and conquer?
[14:08]<y-gz>in the context of startcraft
[14:08]<y-gz>http://scsharp.org/
[14:08]<y-gz>:)
[14:08]<y-gz>"SCSharp is a project to create an engine capable of playing Blizzard's award winning game StarCraft using portable open source libraries and tools. It's also an attempt to keep us programming instead of actually playing the game."
[14:08]<mjzymygo>yeh... I played CandC
[14:08]<y-gz>(coded in C#)
[14:11]<lcs>have you seen TA Spring?
[14:12]<vxznrv>Lighthammer, ?
[14:12]<lyzxvxzddnz>threat you called
[14:12]<vxznrv>Lighthammer, ok that graph library looks ok
[14:12]<lyzxvxzddnz>;)
[14:13]<vxznrv>Lighthammer, but I am after something a bit different, I need to graph a 2d matrix
[14:13]<lyzxvxzddnz>so ? use the bar graphs
[14:13]<vxznrv>Lighthammer, and would like to do so in a 3d look, with perceptive / z axis or whatever
[14:13]<fyfuym-syfggag>threat code it?
[14:13]<fyfuym-syfggag>its simple
[14:14]<vxznrv>Lighthammer, from the screenies I have seen you cant really see that many of the z axis bars







