.NET headaches!
I hate Variants, but unfortunately I have to use them. Since, the components I am writing are supposed to enhance Datasnap somehow, I had to figure out how I could "package" info (to be sent from client to server and vice versa) as OleVariants (in VarArrays of VarBytes so that this would succeed in any circumstances). I implemented a couple of classes that do this kind of stuff (is marshaling the correct term?). These classes used a lot of Move, VarArrayLock e.t.c. instructions and pointers and (with a little help from Manuel Parma) I was able to achieve what I wanted at first place.
And then, a brilliant idea came! I should at least try and port this code to .NET ! That gave me a big disappointment. (I am a newbie to .NET and I don't think the starting point of learning .NET should be how to use IntPtr and Marshal). Besides, OleVariants (variant arrays of VarBytes at least) have a new format (they should be just simply casted to TBytes if I've figured it right).
At first, all my code was stuffed with IFDEFs and that was a real pain. Then, I read this excellent article from Chad Hower and decided to follow his advice. I tried to use polymorphism and tried to isolate all IFDEFs in a particular unit. But, may be the most difficult part was to get rid of all these pointer operations (redesign and reimplement the related classes). I am in the middle of this, but am thinking of wrapping a TMemoryStream to do all the job I need (both in Win32 and CLR) .
I think I 'll also follow another advice I've read somewhere (don't remember where, may be in the same article) and stick to the RTL. For example, I decided to convert all my TList objects to TObjectList and this way avoid doing all these hard type casts like:
TObject(FooList[i]).Free;
.NET is a new world for me and even though it seems fascinating in many aspects, trying to build a cross platform app (component) is a real headache! I would certainly appreciate any kind of help (may be I should buy a book or something) , but I certainly don't like others doing my homework. So, I'll just keep trying on my own!
And then, a brilliant idea came! I should at least try and port this code to .NET ! That gave me a big disappointment. (I am a newbie to .NET and I don't think the starting point of learning .NET should be how to use IntPtr and Marshal). Besides, OleVariants (variant arrays of VarBytes at least) have a new format (they should be just simply casted to TBytes if I've figured it right).
At first, all my code was stuffed with IFDEFs and that was a real pain. Then, I read this excellent article from Chad Hower and decided to follow his advice. I tried to use polymorphism and tried to isolate all IFDEFs in a particular unit. But, may be the most difficult part was to get rid of all these pointer operations (redesign and reimplement the related classes). I am in the middle of this, but am thinking of wrapping a TMemoryStream to do all the job I need (both in Win32 and CLR) .
I think I 'll also follow another advice I've read somewhere (don't remember where, may be in the same article) and stick to the RTL. For example, I decided to convert all my TList objects to TObjectList and this way avoid doing all these hard type casts like:
TObject(FooList[i]).Free;
.NET is a new world for me and even though it seems fascinating in many aspects, trying to build a cross platform app (component) is a real headache! I would certainly appreciate any kind of help (may be I should buy a book or something) , but I certainly don't like others doing my homework. So, I'll just keep trying on my own!

44 Comments:
I read over your blog, and i found it inquisitive, you may find My Blog interesting. My blog is just about my day to day life, as a park ranger. So please Click Here To Read My Blog
I read over your blog, and i found it inquisitive, you may find My Blog interesting. So please Click Here To Read My Blog
http://pennystockinvestment.blogspot.com
Get any Desired College Degree, In less then 2 weeks.
Call this number now 24 hours a day 7 days a week (413) 208-3069
Get these Degrees NOW!!!
"BA", "BSc", "MA", "MSc", "MBA", "PHD",
Get everything within 2 weeks.
100% verifiable, this is a real deal
Act now you owe it to your future.
(413) 208-3069 call now 24 hours a day, 7 days a week.
Hello I just entered before I have to leave to the airport, it's been very nice to meet you, if you want here is the site I told you about where I type some stuff and make good money (I work from home): here it is
i did a little research after you told me about your "thing", and if you want a way to make more money using your your blog you can enter this site: link. bye.
成人圖庫,口交技巧,成人18,自慰方法,Fleshlight,情色自拍貼圖,成人情色貼圖,少婦自拍,一夜情聊天,本土av,色情av,av圖片,色情聊天,成人情色網,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,080視訊聊天室icandy,情色少女貼圖,免費視 訊聊天網,av女優18,免費線上視訊fm358,avdvd免費AV女優,女優王國,做愛,無碼影片,情色交友
原來這世上能跟你共同領略一個笑話的人竟如此難得........................................
還是喜歡這裡-支持你.........................
very popular to u! ........................................
^^ 謝謝你的分享,祝你生活永遠多彩多姿!........................................
Actions speak louder than words. ........................................
hello~~........................................
Hello~Nice to meet you~..................................................
多譏樓主分享 正野緊係要回啦........................................
謝謝您的分享~感恩唷!!..................................................
希望能常常看到你的更新 ........................................
我愛那些使自己的德行成為自己的目標或命定的人..............................
成人遊戲 視訊美女影音 高雄聊天聯盟 免費av1 g8mm視訊影音交友 日本女優貼圖 性感 av影片 做愛偷拍 聊天室 愛愛自拍 夫妻情趣 線上成人18 少女裸體貼圖 色情片影城 免付費a片 免費情色影片線上 免費色情影片網 一夜情的網站 一葉情貼圖片區 383 完美女人視訊聊天室 玩美女人美腿 屎尿美女 性感辣妹介紹 人妻聊天網 熟女做愛自拍 護士做愛 免費一對多 a圖分享區 舒舒 85cc成人片無碼 成人免費a片 嘟嘟 線上a片777 熟女貼圖 台灣援交妹影片 情人視訊聊天 偷拍鋼管秀 免費av電影 洪爺影成 大奶圖片 sex做愛影片 金瓶梅下載 日本巨乳美女 性愛自拍圖 後宮 限制級視訊 免費0204情色 免費性愛 比基尼走光
you‘re really talented.!............................................................
勤勉是幸運的右手,節儉是幸運的左手。 ..................................................
想要推動天下,先要發動自己。..................................................
男女互悅,未必廝守終生,相愛就是美的。..................................................
上來打聲招呼,祝你一切平安! .................................................................
這BLOG真是讓人意猶未盡!!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
良言一句三冬暖,惡語傷人六月寒。....................................................................
希望能常常看到你的更新.................................................................
It takes all kinds to make a world.............................................................
噴泉的高度,不會超過它的源頭。一個人的事業也是如此,它的成就絕不會超過自己的信念。.................................................................
還是喜歡這裡-支持你..................................................................
累了嗎?來杯咖啡休息一下吧!............................................................
要經常發表文章 最愛你了呦............................................................
永遠不要躊躇伸出你的手。也永遠不要躊躇接受別人伸出的手。.................................................................
愛,拆開來是心和受兩個字。用心去接受對方的一切,用心去愛對方的所有。............................................................
謝謝原PO的熱情分享 大家也要一起分享喔 感恩(≧ω≦)............................................................
Make yourself necessary to someone..................................................................
不錯喔~你的部落格很優~............................................................
人們不缺少力量,他們缺少意志。..................................................
快樂,是享受工作過程的結果..................................................
美麗的事物是永恆的快樂,它的可愛日有增加,不會消逝而去................................................
到處逛逛~~來繞繞留個言囉~~~~............................................................
文章雖然普通,但意義卻很大~~^^~~ ..................................................
河水永遠是相同的,可是每一剎那又都是新的。..................................................
若有人問你成功時會不會記得他 試問若你失敗時他會不會記得你......................................................................
說「吃虧就是便宜的人」,多半不是吃虧的人。......................................................................
Δημοσίευση σχολίου
<< Home