小 小刚 Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-22 #1 我做了一个有18000条stringtable的资源文件(约250k), 我用loadstring只能读出10000条,在前往下读就出错, 不知道是什么原因,望指教。
小 小刚 Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-23 #3 >>我不懂,是不是太大了 是啊,我也奇怪,怎么就不能读?
小 小刚 Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-25 #7 to all 让各位就等了,我一周只有2~3个小时上网。 用loadstring读取string resource运行当中出现以下错误信息: "Access violation at address ****** in module KERNEL32.DLL" 我将所有汉字放入一个资源文件,然后loadstring,经过我调试发现, 凡是偏旁就不能load,并且出现上述信息。 各位请试验一下,将以下的stringtable Paste到一个RC文件,编译以后, 用以下代码读取: ..... {$R Pianpang.res} ..... var i:integer; pchar; begin for i:=1 to 62 do begin try if loadstring(hInstance,i,p,20)>0 then listbox1.Items.Add(p); except showmessage('读取资源字符错误'); end; RUN将出现以上错误信息,谁能告诉我这是什么原因吗? stringtable { 1 , "疒pianpang ne" 2 , "阝pianpang fu" 3 , "肀pianpang nie" 4 , "匚pianpang fang" 5 , "纟pianpang" 6 , "艹pianpang cao" 7 , "虍pianpang hu" 8 , "亠pianpang" 9 , "廾pianpang gong" 10 , "忄pianpang" 11 , "彐pianpang ji" 12 , "冂pianpang jiong" 13 , "亻pianpang" 14 , "尢pianpang" 15 , "宀pianpang mian" 16 , "刂pianpang dao" 17 , "灬pianpang biao" 18 , "丶pianpang" 19 , "扌pianpang" 20 , "冫pianpang bing" 21 , "攵pianpang" 22 , "丨pianpang gun" 23 , "礻pianpang" 24 , "夂pianpang" 25 , "饣pianpang" 26 , "丿pianpang" 27 , "屮pianpang cao" 28 , "辶pianpang chuo" 29 , "冖pianpang mi" 30 , "彡pianpang" 31 , "钅pianpang jin" 32 , "犭pianpang" 33 , "囗pianpang guo" 34 , "勹pianpang bao" 35 , "卩pianpang jie" 36 , "廴pianpang" 37 , "衤pianpang" 38 , "丬pianpang" 39 , "凵pianpang kan" 40 , "氵pianpang" 41 , "讠pianpang" 42 , "丿pie pianpang" 43 , "攵pu pianpang" 44 , "犭quan pianpang" 45 , "彡shan pianpang" 46 , "饣shi pianpang" 47 , "扌shou pianpang" 48 , "氵shui pianpang" 49 , "纟si pianpang" 50 , "亠tou pianpang" 51 , "尢wang pianpang" 52 , "彡xian pianpang" 53 , "忄xin pianpang" 54 , "讠yan pianpang" 55 , "丿yi pianpang" 56 , "衤yi pianpang" 57 , "廴yin pianpang" 58, "尢you pianpang" 59 , "夂zhi pianpang" 60 , "夂zhong pianpang" 61 , "丶zhu pianpang" 62 , "丬zhuang pianpang" }
to all 让各位就等了,我一周只有2~3个小时上网。 用loadstring读取string resource运行当中出现以下错误信息: "Access violation at address ****** in module KERNEL32.DLL" 我将所有汉字放入一个资源文件,然后loadstring,经过我调试发现, 凡是偏旁就不能load,并且出现上述信息。 各位请试验一下,将以下的stringtable Paste到一个RC文件,编译以后, 用以下代码读取: ..... {$R Pianpang.res} ..... var i:integer; pchar; begin for i:=1 to 62 do begin try if loadstring(hInstance,i,p,20)>0 then listbox1.Items.Add(p); except showmessage('读取资源字符错误'); end; RUN将出现以上错误信息,谁能告诉我这是什么原因吗? stringtable { 1 , "疒pianpang ne" 2 , "阝pianpang fu" 3 , "肀pianpang nie" 4 , "匚pianpang fang" 5 , "纟pianpang" 6 , "艹pianpang cao" 7 , "虍pianpang hu" 8 , "亠pianpang" 9 , "廾pianpang gong" 10 , "忄pianpang" 11 , "彐pianpang ji" 12 , "冂pianpang jiong" 13 , "亻pianpang" 14 , "尢pianpang" 15 , "宀pianpang mian" 16 , "刂pianpang dao" 17 , "灬pianpang biao" 18 , "丶pianpang" 19 , "扌pianpang" 20 , "冫pianpang bing" 21 , "攵pianpang" 22 , "丨pianpang gun" 23 , "礻pianpang" 24 , "夂pianpang" 25 , "饣pianpang" 26 , "丿pianpang" 27 , "屮pianpang cao" 28 , "辶pianpang chuo" 29 , "冖pianpang mi" 30 , "彡pianpang" 31 , "钅pianpang jin" 32 , "犭pianpang" 33 , "囗pianpang guo" 34 , "勹pianpang bao" 35 , "卩pianpang jie" 36 , "廴pianpang" 37 , "衤pianpang" 38 , "丬pianpang" 39 , "凵pianpang kan" 40 , "氵pianpang" 41 , "讠pianpang" 42 , "丿pie pianpang" 43 , "攵pu pianpang" 44 , "犭quan pianpang" 45 , "彡shan pianpang" 46 , "饣shi pianpang" 47 , "扌shou pianpang" 48 , "氵shui pianpang" 49 , "纟si pianpang" 50 , "亠tou pianpang" 51 , "尢wang pianpang" 52 , "彡xian pianpang" 53 , "忄xin pianpang" 54 , "讠yan pianpang" 55 , "丿yi pianpang" 56 , "衤yi pianpang" 57 , "廴yin pianpang" 58, "尢you pianpang" 59 , "夂zhi pianpang" 60 , "夂zhong pianpang" 61 , "丶zhu pianpang" 62 , "丬zhuang pianpang" }
沈 沈前卫 Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-26 #11 procedure TForm1.Button1Click(Sender: TObject); var i:integer; p:array [0..255] of char; begin for i:=1 to 62 do try if loadstring(hInstance,i,p,256)>0 then ListBox1.Items.Add(p); except showmessage('读取资源字符错误'); end; end;
procedure TForm1.Button1Click(Sender: TObject); var i:integer; p:array [0..255] of char; begin for i:=1 to 62 do try if loadstring(hInstance,i,p,256)>0 then ListBox1.Items.Add(p); except showmessage('读取资源字符错误'); end; end;
小 小刚 Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-27 #13 沈前卫大虾:你的方法虽然帮我解决了问题,但我有一点不明白, 为什么别的都可以读出,但就是偏旁不能读泥? 谢谢你的解答,我的功力太次。
沈 沈前卫 Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-28 #15 原因不明,你其他能读出来,呵呵,是你运气好,如果文本过大,我想肯定出错.
G guojun Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-28 #16 ;P : Pchar is a pointer, but you did't get memory for var P. you're really good luck! GetMem(P,255) = P : array[0..254] of char
;P : Pchar is a pointer, but you did't get memory for var P. you're really good luck! GetMem(P,255) = P : array[0..254] of char