﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-随心所欲-最新评论</title><link>http://www.cnblogs.com/goldenocean/CommentsRSS.aspx</link><description /><language>zh-cn</language><pubDate>Sat, 03 Nov 2007 08:32:31 GMT</pubDate><lastBuildDate>Sat, 03 Nov 2007 08:32:31 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: &amp;quot;SQL Server不存在或访问被拒绝&amp;quot;问题的解决</title><link>http://www.cnblogs.com/goldenocean/archive/2007/09/27/470783.html#907561</link><dc:creator>dyp07</dc:creator><author>dyp07</author><pubDate>Thu, 27 Sep 2007 02:00:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2007/09/27/470783.html#907561</guid><description><![CDATA[只打SP3的补丁就可以可吗，而且是必须的是吗，那SP4还用打吗？<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">dyp07</a> 2007-09-27 10:00 <a href="http://www.cnblogs.com/goldenocean/archive/2007/09/27/470783.html#907561#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: C#程序实现动态调用DLL的研究(转载)</title><link>http://www.cnblogs.com/goldenocean/archive/2007/06/06/509558.html#773504</link><dc:creator>菜鸟一只</dc:creator><author>菜鸟一只</author><pubDate>Wed, 06 Jun 2007 05:52:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2007/06/06/509558.html#773504</guid><description><![CDATA[代码中，object 0 是在if语句块中定义的局部变量，在最后return (object)0时已经超出了其作用域。该代码是否实现过？<br>public object Invoke(string lpFileName,string Namespace,string ClassName,string lpProcName,object[] ObjArray_Parameter) <br><br>{ <br><br>try <br><br>{// 判断 MyAssembly 是否为空或 MyAssembly 的命名空间不等于要调用方法的命名空间，如果条件为真，就用 Assembly.Load 加载所需 DLL 作为程序集 <br><br>if(MyAssembly==null||MyAssembly.GetName().Name!=Namespace) <br><br>MyAssembly=Assembly.Load(LoadDll(lpFileName)); <br><br>Type[] type=MyAssembly.GetTypes(); <br><br>foreach(Type t in type) <br><br>{ <br><br>if(t.Namespace==Namespace&amp;&amp;t.Name==ClassName) <br><br>{ <br><br>MethodInfo m=t.GetMethod(lpProcName); <br><br>if(m!=null) <br><br>{// 调用并返回 <br><br>object o=Activator.CreateInstance(t); <br><br>return m.Invoke(o,ObjArray_Parameter); <br><br>} <br><br>else <br><br>System.Windows.Forms.MessageBox.Show(&quot; 装载出错 !&quot;); <br><br>} <br><br>} <br><br>} <br><br>catch(System.NullReferenceException e) <br><br>{ <br><br>System.Windows.Forms.MessageBox.Show(e.Message); <br><br>} <br><br>return (object)0; <br><br>} <br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">菜鸟一只</a> 2007-06-06 13:52 <a href="http://www.cnblogs.com/goldenocean/archive/2007/06/06/509558.html#773504#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: C#程序实现动态调用DLL的研究(转载)[未登录]</title><link>http://www.cnblogs.com/goldenocean/archive/2007/06/04/509558.html#771135</link><dc:creator>玲</dc:creator><author>玲</author><pubDate>Mon, 04 Jun 2007 12:33:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2007/06/04/509558.html#771135</guid><description><![CDATA[&quot;尝试读取或写入受保护的内存。这通常指示其他内存已损坏。&quot;<br>我总是出现这个错误，能否帮忙看看……<br>在.net中的声明和调用如下<br> [DllImport(&quot;C:\\Dev-Cpp\\新建文件夹\\libProject1.dll&quot;, EntryPoint = &quot;_ZN4Trie6insertEPc&quot;, CallingConvention = CallingConvention.ThisCall, CharSet = CharSet.Auto, SetLastError = true)]<br>        public static extern void insert(IntPtr ths,ref String word);<br><br><br>        [DllImport(&quot;C:\\Dev-Cpp\\新建文件夹\\libProject1.dll&quot;, EntryPoint = &quot;_ZN4Trie9wordFoundEPc&quot;, CallingConvention = CallingConvention.ThisCall, CharSet = CharSet.Unicode, SetLastError = true)]<br>        public static extern  bool wordFound(IntPtr ths,ref  String word);<br><br>        [DllImport(&quot;C:\\Dev-Cpp\\新建文件夹\\libProject1.dll&quot; )]<br>        public static extern  IntPtr  CreateTrie(String word);<br><br>        [DllImport(&quot;C:\\Dev-Cpp\\新建文件夹\\libProject1.dll&quot;)]<br>        public static extern void DeleteTrie(IntPtr instance);<br>       <br>        private void button4_Click(object sender, EventArgs e)<br>        {<br>        }<br>        private void Form1_Load(object sender, EventArgs e)<br>        {<br>            StreamReader objReader = new StreamReader(&quot;C:\\1.txt&quot;);<br>            string sLine = &quot;&quot;;<br>            ArrayList arrText = new ArrayList();<br>           string s = &quot;a&quot;;<br>            IntPtr instancePtr = CreateTrie(s);   <br>            while (sLine != null)<br>            {<br>                sLine = objReader.ReadLine();<br>                if (sLine != null)<br>                {<br>                    string[] split = null;<br><br>                    int count = 0;<br>                    <br>                    split = sLine.Split(new char[] { ' '});<br>                    foreach (string word in split)<br>                    {<br>                        count++;<br>                     <br>                      }<br>                      for (int i = 0; i &lt; count;i++ )<br>                      {<br>                          try<br>                          {<br>                             // string n_size = instancePtr.ToString();<br>                            //  MessageBox.Show(n_size);<br>                              insert(instancePtr, ref split[i]);<br>                               DeleteTrie(instancePtr);<br><br>                              string ww = split[i];<br>                              MessageBox.Show(ww);<br>                           <br>                              if (wordFound(instancePtr, ref ww))<br><br>                                  MessageBox.Show(&quot;founded&quot;);<br>                          }<br>                          catch (Exception es)<br>                          {<br>                              MessageBox.Show(es.ToString());<br>                          }<br>                      }      <br>                }<br>            }<br>          objReader.Close();<br>   <br>        }<br>我的dll源程序的头文件是这样的<br>#ifndef _DLL_H_<br>#define _DLL_H_<br><br><br># define DLLIMPORT __declspec (dllexport)<br><br>#include &lt;iomanip.h&gt;<br>class Trie;<br>class TrieNonLeafNode {<br>               <br>                  public:  <br>                      TrieNonLeafNode(char ch)<br>                      {<br>                        ptrs = new TrieNonLeafNode*;<br>                        letters = new char[2];<br>                        if (ptrs == 0 || letters == 0) {<br>                                         return ;<br>                        }<br>                        leaf = false;<br>                        endOfWord = false;<br>                        *ptrs = 0;<br>                        *letters = ch;<br>                        *(letters+1) = '\0';<br>                                           };<br>               private:<br>                       bool leaf, endOfWord;<br>                       char *letters;<br>                       TrieNonLeafNode **ptrs;<br>                       friend  class Trie;<br>                       };<br><br>      class  TrieLeafNode {<br>            <br>                    public: <br>                      TrieLeafNode(char* suffix){<br>                          leaf = true;<br>                          word = new char[strlen(suffix)+1];<br>                          if (word == 0) {<br>                           // cerr &lt;&lt; &quot;Out of memory2.\n&quot;;<br>                            // exit(-1);<br>                            return ;<br>                           }<br>                           strcpy(word,suffix);<br>                           };<br>                      private:<br>                       bool leaf;<br>                        char *word;<br>                        friend class Trie;<br>                        };     <br>class Trie<br>{<br>public:<br>        <br>      Trie(char *);<br>      <br>    <br>   //  void  DLLIMPORT   printTrie(); <br>     void  DLLIMPORT   insert(char*);<br>     bool  DLLIMPORT   wordFound(char*);<br><br>  private:<br>    TrieNonLeafNode *root;<br>    int notFound;<br>    char prefix[80];<br>    int  position(TrieNonLeafNode*,char);<br>    void addCell(char,TrieNonLeafNode*,int);<br>    void createLeaf(char,char*,TrieNonLeafNode*);<br>  //  void printTrie(int,TrieNonLeafNode*,char*);<br>    <br>};<br><br>extern &quot;C&quot; DLLIMPORT Trie * CreateTrie(char * word);<br>      <br>extern &quot;C&quot; DLLIMPORT void DeleteTrie( Trie* instance );            <br>#endif /* _DLL_H_ */<br><br>急切盼望你的回复，小妹刚出道阿，希望你能帮帮我。<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">玲</a> 2007-06-04 20:33 <a href="http://www.cnblogs.com/goldenocean/archive/2007/06/04/509558.html#771135#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: &amp;quot;SQL Server不存在或访问被拒绝&amp;quot;问题的解决</title><link>http://www.cnblogs.com/goldenocean/archive/2007/05/11/470783.html#742822</link><dc:creator>不存在</dc:creator><author>不存在</author><pubDate>Fri, 11 May 2007 05:11:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2007/05/11/470783.html#742822</guid><description><![CDATA[谢谢 果然高手 帮忙解决了大问题 再接再厉<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">不存在</a> 2007-05-11 13:11 <a href="http://www.cnblogs.com/goldenocean/archive/2007/05/11/470783.html#742822#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: &amp;quot;SQL Server不存在或访问被拒绝&amp;quot;问题的解决</title><link>http://www.cnblogs.com/goldenocean/archive/2007/04/12/470783.html#711150</link><dc:creator>bells</dc:creator><author>bells</author><pubDate>Thu, 12 Apr 2007 11:38:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2007/04/12/470783.html#711150</guid><description><![CDATA[真的只是打补丁的问题吗？<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">bells</a> 2007-04-12 19:38 <a href="http://www.cnblogs.com/goldenocean/archive/2007/04/12/470783.html#711150#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 软件测试的基础知识概要介绍(转载)</title><link>http://www.cnblogs.com/goldenocean/archive/2006/12/27/402147.html#604609</link><dc:creator>lisa2y</dc:creator><author>lisa2y</author><pubDate>Wed, 27 Dec 2006 02:14:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2006/12/27/402147.html#604609</guid><description><![CDATA[很受益,关注中<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">lisa2y</a> 2006-12-27 10:14 <a href="http://www.cnblogs.com/goldenocean/archive/2006/12/27/402147.html#604609#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: &amp;quot;SQL Server不存在或访问被拒绝&amp;quot;问题的解决</title><link>http://www.cnblogs.com/goldenocean/archive/2006/12/26/470783.html#604149</link><dc:creator>pdyang</dc:creator><author>pdyang</author><pubDate>Tue, 26 Dec 2006 09:29:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2006/12/26/470783.html#604149</guid><description><![CDATA[好<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">pdyang</a> 2006-12-26 17:29 <a href="http://www.cnblogs.com/goldenocean/archive/2006/12/26/470783.html#604149#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: &amp;quot;SQL Server不存在或访问被拒绝&amp;quot;问题的解决</title><link>http://www.cnblogs.com/goldenocean/archive/2006/09/14/470783.html#504047</link><dc:creator>woshishui</dc:creator><author>woshishui</author><pubDate>Thu, 14 Sep 2006 03:47:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2006/09/14/470783.html#504047</guid><description><![CDATA[2006-08-09 21:41 by wuChang <br>win2003 + sqlserver2000时 sql2000一定得打sp3其他机才能连上，直接打sp4都不行的！<br><br>谢谢大大了,我试试<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">woshishui</a> 2006-09-14 11:47 <a href="http://www.cnblogs.com/goldenocean/archive/2006/09/14/470783.html#504047#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: &amp;quot;SQL Server不存在或访问被拒绝&amp;quot;问题的解决</title><link>http://www.cnblogs.com/goldenocean/archive/2006/08/09/470783.html#472661</link><dc:creator>wuChang</dc:creator><author>wuChang</author><pubDate>Wed, 09 Aug 2006 13:41:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2006/08/09/470783.html#472661</guid><description><![CDATA[win2003 + sqlserver2000时 sql2000一定得打sp3其他机才能连上，直接打sp4都不行的！<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">wuChang</a> 2006-08-09 21:41 <a href="http://www.cnblogs.com/goldenocean/archive/2006/08/09/470783.html#472661#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Jar文件揭密(转载)</title><link>http://www.cnblogs.com/goldenocean/archive/2005/08/23/215036.html#221040</link><dc:creator>婕舞飞扬</dc:creator><author>婕舞飞扬</author><pubDate>Tue, 23 Aug 2005 07:47:00 GMT</pubDate><guid>http://www.cnblogs.com/goldenocean/archive/2005/08/23/215036.html#221040</guid><description><![CDATA[golenocean<br><br><div align=right><a style="text-decoration:none;" href="http://goldenocean.cnblogs.com/" target="_blank">婕舞飞扬</a> 2005-08-23 15:47 <a href="http://www.cnblogs.com/goldenocean/archive/2005/08/23/215036.html#221040#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>