<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx</link><description>VFP allows you to generate COM servers using the OLEPUBLIC keyword. These objects can have custom properties. For example, a Customer object can have an Address property of type string. Other client applications (VFP, Excel, VB.Net, VB Script) can see</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#460944</link><pubDate>Mon, 05 Sep 2005 09:37:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:460944</guid><dc:creator>Rick Strahl</dc:creator><description>Looks like there's a small bug with the type casting: &lt;br&gt;&lt;br&gt;CASE nType=3&lt;br&gt;   cstr = cstr + &amp;quot;int&amp;quot;&lt;br&gt;   *cstr=cstr+ &amp;quot;integer&amp;quot;  // invalid&lt;br&gt;&lt;br&gt;The Midl compiler failed on me when I had an integer value in the inbound parameters. Works well now.&lt;br&gt;&lt;br&gt;Just for others who want to wrap this up other than a project hook you can just put the class into a PRG and do:&lt;br&gt;&lt;br&gt;LPARAMETERS lcDll&lt;br&gt;&lt;br&gt;IF !EMPTY(lcDLL)&lt;br&gt;   o = CREATEOBJECT('FixTypeLibrary')&lt;br&gt;   ? o.FixTlb(lcDLL)&lt;br&gt;ENDIF&lt;br&gt;&lt;br&gt;#DEFINE VS_PATH &amp;quot;D:\programs\vstudio2003\Vc7\bin\vcvars32.bat&amp;quot;&lt;br&gt;&lt;br&gt;Note I renamed the class and replaced the hardcoded VS path which might be a good idea. No heavy duty testing here, but it works for the simple scnearios I tried generically. Cool</description></item><item><title>FoxPro and COM typelibrary creation</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#460948</link><pubDate>Mon, 05 Sep 2005 09:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:460948</guid><dc:creator>Rick Strahl's WebLog</dc:creator><description>If you're using COM with VFP you may have run into a nasty problem that doesn't allow VFP to create a typelibary containing parameters, return values or property types of other classes/interfaces that exist in the current project. Calvin posted a solution to this problem the other day and here is some additional information around the topic.</description></item><item><title>re: Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#463831</link><pubDate>Mon, 12 Sep 2005 06:53:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463831</guid><dc:creator>Craig Boyd</dc:creator><description>Calvin,&lt;br&gt;&lt;br&gt;My reaction is the same as Rick's... Cool!</description></item><item><title>re: Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#496492</link><pubDate>Thu, 24 Nov 2005 02:08:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:496492</guid><dc:creator>Anatoliy Mogylevets</dc:creator><description>Calvin, &lt;br&gt;&lt;br&gt;This is great! Thanks for sharing your knowledge with the community.&lt;br&gt;&lt;br&gt;You preserve 2 sections of EXE before updating the resources. As I understand, without this nice trick, VFP dll or executable would be damaged/truncated.&lt;br&gt;&lt;br&gt;If possible, could you explain why this is required. Is there someting wrong with the UpdateResource API, or it's just because of some specifics of VFP executable format?&lt;br&gt;&lt;br&gt;Thanks!</description></item><item><title>re: Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#510246</link><pubDate>Sat, 07 Jan 2006 00:48:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:510246</guid><dc:creator>Dan Thomas</dc:creator><description>It appears that strong typing with more than one method parameters generates an midl compile error?...&lt;br&gt;&lt;br&gt;FUNCTION MyMethod (MyParam1 AS integer) AS integer&lt;br&gt;... this works&lt;br&gt;&lt;br&gt;FUNCTION MyMethod (MyParam1 AS integer, MyParam2 AS string) AS integer&lt;br&gt;.. this generates errors during the midl compile&lt;br&gt;&lt;br&gt;Any ideas?</description></item><item><title>My homepage</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#1337012</link><pubDate>Thu, 21 Dec 2006 05:33:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1337012</guid><dc:creator>Dennis</dc:creator><description>&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;[url=&lt;a rel="nofollow" target="_new" href="http://pmmdwqkn.com/grll/hsqc.html"&gt;http://pmmdwqkn.com/grll/hsqc.html&lt;/a&gt;]My homepage[/url] | [url=&lt;a rel="nofollow" target="_new" href="http://vpgylnxb.com/jfox/nmss.html"&gt;http://vpgylnxb.com/jfox/nmss.html&lt;/a&gt;]Cool site[/url]&lt;/p&gt;
</description></item><item><title>Add a manifest to control your application Vista UAC behavior</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#2120533</link><pubDate>Sat, 14 Apr 2007 00:32:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2120533</guid><dc:creator>Calvin Hsia's WebLog</dc:creator><description>&lt;p&gt;Try this on Windows XP or Vista (I don’t remember if manifests are allowed on Win2000: can someone confirm&lt;/p&gt;
</description></item><item><title>Allowing Optional parameters in your COM objects</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#2684450</link><pubDate>Thu, 17 May 2007 04:31:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2684450</guid><dc:creator>Calvin Hsia's WebLog</dc:creator><description>&lt;p&gt;It’s simple to create a VFP object that can be used within other applications. I show how useful it is&lt;/p&gt;
</description></item><item><title>re: Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#8481543</link><pubDate>Fri, 09 May 2008 22:17:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8481543</guid><dc:creator>Jon Goad</dc:creator><description>&lt;p&gt;I had to change this line: &lt;/p&gt;
&lt;p&gt;strTlb=FILETOSTR(&amp;quot;t.tlb&amp;quot;)&lt;/p&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;p&gt;strTlb=FILETOSTR(&amp;quot;tlibtest.tlb&amp;quot;)&lt;/p&gt;
&lt;p&gt;Without this change, it gives the error that the file t.tlb does not exist. &lt;/p&gt;
</description></item><item><title>re: Strongly typed methods and properties</title><link>http://blogs.msdn.com/calvin_hsia/archive/2005/09/02/strongly-typed-methods-and-properties.aspx#9456735</link><pubDate>Tue, 03 Mar 2009 17:04:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9456735</guid><dc:creator>TZuidema</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;At the end, when the (2) sections are restored to the EXE, the order of the sections is reversed.&lt;/p&gt;
&lt;p&gt;That prohibited COM registration on our EXE.&lt;/p&gt;
&lt;p&gt;So instead of the last FOR i = 1 TO 2, use&lt;/p&gt;
&lt;p&gt;FOR i = 2 TO 1 STEP -1&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Timo.&lt;/p&gt;
</description></item></channel></rss>