Creating a DLL that would bridge an unmanaged Delphi call to managed C#

Hello, I'm trying to create this DLL that will get called from a
Delphi program. In order to interface the unmanaged Delphi program
with the managed C#, I'm trying to make an intermediary bridge DLL. So
far I've been able to make it accessible to the Delphi program, but
I'm having problems returning a string which is passed as a pchar
parameter.

Delphi signature for the function I'm implementing:
function ElectronicPay(const input :pchar, var output :pchar):
boolean; export; stdcall;

C# bridge implementation so far:
        [DllExport] // http://www.codeproject.com/KB/dotnet/DllExporter.aspx?msg=3267441
        public unsafe static bool ElectronicPay(string input, IntPtr
output)
        {
            string managedOutput = Marshal.PtrToStringAnsi(output);

            Terminal.ElectronicPay(input, ref managedOutput);

            output = Marshal.StringToHGlobalAnsi(managedOutput);
            return true;
        }

Now the input string works perfectly. However I'm having problems with
producing the output. I'm pretty sure I'm not supposed to allocate the
memory for output, but rather use what they should have given me
already preallocated. However I haven't been able to get the string
they are sending in in the output parameter. Can anybody shine some
light on how to deal with this situation. Please note that I don't
have any control nor source code of the Delphi program.

Thanks.
Dan
0
Daniel
3/29/2010 1:22:59 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

9 Replies
1461 Views

Similar Articles

[PageSpeed] 51

Daniel W. wrote:
> [...]
> C# bridge implementation so far:
>   [DllExport] // http://www.codeproject.com/KB/dotnet/DllExporter.aspx?msg=3267441

Wow.  That seems overly complex.

If I were doing this (and thankfully, I'm not :) ), I would expose my 
managed code as a COM object.  Then I would either access the COM object 
directly from the unmanaged code, or I would write an unmanaged wrapper 
that does that.

In your case, it sounds like the latter would be necessary, since the 
original Delphi isn't expecting a COM object, nor are you able to change 
it so that it does.

Post-processing a managed assembly seems unreasonably complicated to me. 
  Not that COM is trivial to get right, but .NET and Windows both 
already have significant built-in support to handle conversion to and 
from COM-friendly types and marshaling function calls between unmanaged, 
COM, and managed code.  Seems like it would make more sense to take 
advantage of that.

Pete
0
Peter
3/29/2010 1:39:37 AM
On 28-03-2010 21:22, Daniel W. wrote:
> Hello, I'm trying to create this DLL that will get called from a
> Delphi program. In order to interface the unmanaged Delphi program
> with the managed C#, I'm trying to make an intermediary bridge DLL. So
> far I've been able to make it accessible to the Delphi program, but
> I'm having problems returning a string which is passed as a pchar
> parameter.
>
> Delphi signature for the function I'm implementing:
> function ElectronicPay(const input :pchar, var output :pchar):
> boolean; export; stdcall;
>
> C# bridge implementation so far:
>          [DllExport] // http://www.codeproject.com/KB/dotnet/DllExporter.aspx?msg=3267441
>          public unsafe static bool ElectronicPay(string input, IntPtr
> output)
>          {
>              string managedOutput = Marshal.PtrToStringAnsi(output);
>
>              Terminal.ElectronicPay(input, ref managedOutput);
>
>              output = Marshal.StringToHGlobalAnsi(managedOutput);
>              return true;
>          }
>
> Now the input string works perfectly. However I'm having problems with
> producing the output. I'm pretty sure I'm not supposed to allocate the
> memory for output, but rather use what they should have given me
> already preallocated. However I haven't been able to get the string
> they are sending in in the output parameter. Can anybody shine some
> light on how to deal with this situation. Please note that I don't
> have any control nor source code of the Delphi program.

I would drop that DllExport thingy and manually write a Win32 DLL in
mixed mode C++ that exposes the Win32 API that Delphi expects and
calls your .NET stuff.

That should be relative trivial.

Arne
0
ISO
3/29/2010 1:56:16 AM
On Mar 28, 9:56=A0pm, Arne Vajh=F8j <a...@vajhoej.dk> wrote:
> I would drop that DllExport thingy and manually write a Win32 DLL in
> mixed mode C++ that exposes the Win32 API that Delphi expects and
> calls your .NET stuff.
>
> That should be relative trivial.
>
> Arne

I'm actually fairly close to getting it this way, using "mixed-mode
C#" with the DllExport. I think I may hit the same wall with C++,
since it is appearing to me that they are not preallocating the memory
for that string. Also I have no idea on how to write a mixed-mode C++
dll. I know that the previous code would have a memory leak, if it
works, I would be freeing up that memory after a period of time.
0
Daniel
3/29/2010 2:01:02 PM
Daniel W. wrote:
> On Mar 28, 9:56 pm, Arne Vajh�j <a...@vajhoej.dk> wrote:
>> I would drop that DllExport thingy and manually write a Win32 DLL in
>> mixed mode C++ that exposes the Win32 API that Delphi expects and
>> calls your .NET stuff.
>>
>> That should be relative trivial.
>>
>> Arne
> 
> I'm actually fairly close to getting it this way, using "mixed-mode
> C#" with the DllExport. I think I may hit the same wall with C++,
> since it is appearing to me that they are not preallocating the memory
> for that string. Also I have no idea on how to write a mixed-mode C++
> dll. I know that the previous code would have a memory leak, if it
> works, I would be freeing up that memory after a period of time.

Writing a mixed-mode C++ DLL is, as Arne suggests, trivial: just compile 
C++ code with managed support (you can find this in the project 
properties, or use /clr on a command line build).

User-defined types in the DLL can include both managed types and 
unmanaged types (i.e. managed types will be "value class", "value 
struct", "ref class", or "ref struct", while unmanaged types will just 
be "struct" or "class").  Any unmanaged program can use any of the 
unmanaged types just as it could those found in any other unmanaged DLL. 
  And those unmanaged types can in turn use any managed types they need 
to, providing the necessary connection between the unmanaged code using 
your DLL and any managed code you need to use.

I suggested COM because for certain kinds of data marshaling, it should 
be simpler.  But of course it adds the complexity of dealing with COM, 
which you don't have if you use a mixed-mode DLL.  Instead, you will 
probably find yourself using the System.Runtime.InteropServices.Marshal 
class to convert between managed and unmanaged types within whatever 
"bridge" type you create (i.e. the unmanaged type in your mixed-mode DLL 
that in turn uses managed types).

IMHO, no matter how close you are to getting the DllExportAttribute 
attribute to work, you should abandon that approach.  Let Visual Studio 
do all of the necessary processing of your code to accomplish the task; 
adding an external layer to that can only make things more complicated, 
harder to get working correctly, and easier to break.

Which approach you should take � COM or mixed-mode DLL � will IMHO 
depend on what you're already most comfortable with.  If you don't know 
anything about either, I would recommend going with Arne's suggestion, 
to use a mixed-mode DLL.  IMHO it's probably easier to learn the Marshal 
class than to learn all the ins and outs of COM programming.

Pete
0
Peter
3/29/2010 3:33:24 PM
On 29-03-2010 10:01, Daniel W. wrote:
> On Mar 28, 9:56 pm, Arne Vajh�j<a...@vajhoej.dk>  wrote:
>> I would drop that DllExport thingy and manually write a Win32 DLL in
>> mixed mode C++ that exposes the Win32 API that Delphi expects and
>> calls your .NET stuff.
>>
>> That should be relative trivial.
>
> I'm actually fairly close to getting it this way, using "mixed-mode
> C#" with the DllExport. I think I may hit the same wall with C++,
> since it is appearing to me that they are not preallocating the memory
> for that string. Also I have no idea on how to write a mixed-mode C++
> dll. I know that the previous code would have a memory leak, if it
> works, I would be freeing up that memory after a period of time.

I still think you should drop that funky middleware and just
code it.

If you need to return a char*/PChar then you only have two
choices to avoid memory leak:
1) return static buffer and the Delphi code better copy
    the data before next call
2) dynamic allocate in C++ and have Delphi call something
    to deallocate

No magic.

Arne


0
ISO
3/30/2010 2:01:19 AM
On 29-03-2010 22:01, Arne Vajh�j wrote:
> On 29-03-2010 10:01, Daniel W. wrote:
>> On Mar 28, 9:56 pm, Arne Vajh�j<a...@vajhoej.dk> wrote:
>>> I would drop that DllExport thingy and manually write a Win32 DLL in
>>> mixed mode C++ that exposes the Win32 API that Delphi expects and
>>> calls your .NET stuff.
>>>
>>> That should be relative trivial.
>>
>> I'm actually fairly close to getting it this way, using "mixed-mode
>> C#" with the DllExport. I think I may hit the same wall with C++,
>> since it is appearing to me that they are not preallocating the memory
>> for that string. Also I have no idea on how to write a mixed-mode C++
>> dll. I know that the previous code would have a memory leak, if it
>> works, I would be freeing up that memory after a period of time.
>
> I still think you should drop that funky middleware and just
> code it.
>
> If you need to return a char*/PChar then you only have two
> choices to avoid memory leak:
> 1) return static buffer and the Delphi code better copy
> the data before next call
> 2) dynamic allocate in C++ and have Delphi call something
> to deallocate
>
> No magic.

Super simple code example:

program high;

{$APPTYPE CONSOLE}

function dup(s : PChar):PCHar; stdcall; external 'middle2' index 1;

begin
   writeln(dup('ABC'));
end.

#include <windows.h>

#include <cstring>

using namespace std;

#using <mscorlib.dll>
#using <low2.dll>

using namespace System;
using namespace System::Runtime::InteropServices;

extern "C"
{
__declspec(dllexport) char* __stdcall dup(char* s);
}

static char buf[100];

__declspec(dllexport) char* __stdcall dup(char* s)
{
     String^ s2 = gcnew String(s);
     s2 = Low::Dup(s2);
     strcpy(buf, (char *)Marshal::StringToHGlobalAnsi(s2).ToPointer());
     return buf;
}

using System;

public class Low
{
     public static string Dup(string s)
     {
         return s + s;
     }
}

Obviously there are a zillion variants, but it is doable.

Arne
0
ISO
3/30/2010 2:02:43 AM
On Mar 29, 10:02=A0pm, Arne Vajh=F8j <a...@vajhoej.dk> wrote:
> On 29-03-2010 22:01, Arne Vajh=F8j wrote:
>
>
>
> > On 29-03-2010 10:01, Daniel W. wrote:
> >> On Mar 28, 9:56 pm, Arne Vajh=F8j<a...@vajhoej.dk> wrote:
> >>> I would drop that DllExport thingy and manually write a Win32 DLL in
> >>> mixed mode C++ that exposes the Win32 API that Delphi expects and
> >>> calls your .NET stuff.
>
> >>> That should be relative trivial.
>
> >> I'm actually fairly close to getting it this way, using "mixed-mode
> >> C#" with the DllExport. I think I may hit the same wall with C++,
> >> since it is appearing to me that they are not preallocating the memory
> >> for that string. Also I have no idea on how to write a mixed-mode C++
> >> dll. I know that the previous code would have a memory leak, if it
> >> works, I would be freeing up that memory after a period of time.
>
> > I still think you should drop that funky middleware and just
> > code it.
>
> > If you need to return a char*/PChar then you only have two
> > choices to avoid memory leak:
> > 1) return static buffer and the Delphi code better copy
> > the data before next call
> > 2) dynamic allocate in C++ and have Delphi call something
> > to deallocate
>
> > No magic.
>
> Super simple code example:
>
> program high;
>
> {$APPTYPE CONSOLE}
>
> function dup(s : PChar):PCHar; stdcall; external 'middle2' index 1;
>
> begin
> =A0 =A0writeln(dup('ABC'));
> end.
>
> #include <windows.h>
>
> #include <cstring>
>
> using namespace std;
>
> #using <mscorlib.dll>
> #using <low2.dll>
>
> using namespace System;
> using namespace System::Runtime::InteropServices;
>
> extern "C"
> {
> __declspec(dllexport) char* __stdcall dup(char* s);
>
> }
>
> static char buf[100];
>
> __declspec(dllexport) char* __stdcall dup(char* s)
> {
> =A0 =A0 =A0String^ s2 =3D gcnew String(s);
> =A0 =A0 =A0s2 =3D Low::Dup(s2);
> =A0 =A0 =A0strcpy(buf, (char *)Marshal::StringToHGlobalAnsi(s2).ToPointer=
());
> =A0 =A0 =A0return buf;
>
> }
>
> using System;
>
> public class Low
> {
> =A0 =A0 =A0public static string Dup(string s)
> =A0 =A0 =A0{
> =A0 =A0 =A0 =A0 =A0return s + s;
> =A0 =A0 =A0}
>
> }
>
> Obviously there are a zillion variants, but it is doable.
>
> Arne

Thanks Arne,

That has been very helpful, and now I'm not fiddling with weird stuff.
However after converting it to mixed-mode C++, I still get the same
garbage on the char* output parameter. Do you have any clue of what
else can be the problem?


__declspec(dllexport) bool __stdcall ElectronicPay(const char* input,
char* output)
{
    String^ input2 =3D gcnew String(input);
    String^ output2 =3D gcnew String(output);
    //String^ output2 =3D Marshal::PtrToStringAnsi(output);
  // either of the above two result in a output2 being garbage, input2
is correct though

    ICGCC::Terminal::ElectronicPay(input2, output2);

    strcpy(output, (char
*)Marshal::StringToHGlobalAnsi(output2).ToPointer());

    return true;
}
0
Daniel
3/30/2010 4:47:01 PM
On Mar 29, 10:02=A0pm, Arne Vajh=F8j <a...@vajhoej.dk> wrote:
> On 29-03-2010 22:01, Arne Vajh=F8j wrote:
>
>
>
> > On 29-03-2010 10:01, Daniel W. wrote:
> >> On Mar 28, 9:56 pm, Arne Vajh=F8j<a...@vajhoej.dk> wrote:
> >>> I would drop that DllExport thingy and manually write a Win32 DLL in
> >>> mixed mode C++ that exposes the Win32 API that Delphi expects and
> >>> calls your .NET stuff.
>
> >>> That should be relative trivial.
>
> >> I'm actually fairly close to getting it this way, using "mixed-mode
> >> C#" with the DllExport. I think I may hit the same wall with C++,
> >> since it is appearing to me that they are not preallocating the memory
> >> for that string. Also I have no idea on how to write a mixed-mode C++
> >> dll. I know that the previous code would have a memory leak, if it
> >> works, I would be freeing up that memory after a period of time.
>
> > I still think you should drop that funky middleware and just
> > code it.
>
> > If you need to return a char*/PChar then you only have two
> > choices to avoid memory leak:
> > 1) return static buffer and the Delphi code better copy
> > the data before next call
> > 2) dynamic allocate in C++ and have Delphi call something
> > to deallocate
>
> > No magic.
>
> Super simple code example:
>
> program high;
>
> {$APPTYPE CONSOLE}
>
> function dup(s : PChar):PCHar; stdcall; external 'middle2' index 1;
>
> begin
> =A0 =A0writeln(dup('ABC'));
> end.
>
> #include <windows.h>
>
> #include <cstring>
>
> using namespace std;
>
> #using <mscorlib.dll>
> #using <low2.dll>
>
> using namespace System;
> using namespace System::Runtime::InteropServices;
>
> extern "C"
> {
> __declspec(dllexport) char* __stdcall dup(char* s);
>
> }
>
> static char buf[100];
>
> __declspec(dllexport) char* __stdcall dup(char* s)
> {
> =A0 =A0 =A0String^ s2 =3D gcnew String(s);
> =A0 =A0 =A0s2 =3D Low::Dup(s2);
> =A0 =A0 =A0strcpy(buf, (char *)Marshal::StringToHGlobalAnsi(s2).ToPointer=
());
> =A0 =A0 =A0return buf;
>
> }
>
> using System;
>
> public class Low
> {
> =A0 =A0 =A0public static string Dup(string s)
> =A0 =A0 =A0{
> =A0 =A0 =A0 =A0 =A0return s + s;
> =A0 =A0 =A0}
>
> }
>
> Obviously there are a zillion variants, but it is doable.
>
> Arne

Woohoo!!

Here's the working code:

__declspec(dllexport) bool __stdcall ElectronicPay(const char* input,
char** output)
{
    String^ input2 =3D gcnew String(input);
    String^ output2 =3D gcnew String(*output);

    ICGCC::Terminal::ElectronicPay(input2, output2);

    strcpy(*output, (char
*)Marshal::StringToHGlobalAnsi(output2).ToPointer());

    return true;
}

It turns out that the Delphi declaration includes a var keyword.
function ElectronicPay(const input :pchar, var output :pchar):boolean;
export; stdcall;

Apparently that "var output :pchar" would be the equivalent of "char**
output"

I'm not completely sure if this is totally right due to my lack of
experience with C++, but it appears to be working, I will do extensive
tests on this.

Thanks a lot to Arne and Peter for pointing me into the right
direction, and making me forget that DllExporter thingy.
0
Daniel
3/30/2010 5:49:22 PM
On 30-03-2010 13:49, Daniel W. wrote:
> On Mar 29, 10:02 pm, Arne Vajh�j<a...@vajhoej.dk>  wrote:
>> On 29-03-2010 22:01, Arne Vajh�j wrote:
>>> If you need to return a char*/PChar then you only have two
>>> choices to avoid memory leak:
>>> 1) return static buffer and the Delphi code better copy
>>> the data before next call
>>> 2) dynamic allocate in C++ and have Delphi call something
>>> to deallocate
>>
>>> No magic.
>>
>> Super simple code example:

> Here's the working code:
>
> __declspec(dllexport) bool __stdcall ElectronicPay(const char* input,
> char** output)
> {
>      String^ input2 = gcnew String(input);
>      String^ output2 = gcnew String(*output);
>
>      ICGCC::Terminal::ElectronicPay(input2, output2);
>
>      strcpy(*output, (char
> *)Marshal::StringToHGlobalAnsi(output2).ToPointer());
>
>      return true;
> }
>
> It turns out that the Delphi declaration includes a var keyword.
> function ElectronicPay(const input :pchar, var output :pchar):boolean;
> export; stdcall;
>
> Apparently that "var output :pchar" would be the equivalent of "char**
> output"
>
> I'm not completely sure if this is totally right due to my lack of
> experience with C++, but it appears to be working, I will do extensive
> tests on this.

That sounds correct.

char* = pchar
char** = var pchar

Arne
0
ISO
3/30/2010 10:05:42 PM
Reply:

Similar Artilces:

C#.net click event associated with database error
I would like to know what to do to solve the problem listed below: When I am debugging a C#.Net 2008 windows application and click on the 'next' button, I am getting the following error: 'An unexpected error has occurred. The 'Microsoft.jet.oledb.4.0'provider is not registered on the local machine'. I think that I may need to change some setting I have in the visual studio.net 2008 professional edition to solve this problem prior to clicking on the 'next' button. I am working on an workstation that is 64 bits, XP operating syste...

Open form and if no matching records create a new record
I am sure this is simple for most of you but I am stumped. I have a form PT_Demog that needs to open another form PT_MedBasic I created a button using the wizard to open records with Patient_ID. Private Sub Medical_Form_Click() On Error GoTo Err_Medical_Form_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "PT_MedBasic" stLinkCriteria = "[Patient_ID]=" & Me![Patient_ID] DoCmd.OpenForm stDocName, , , stLinkCriteria Const cQuote = """" 'Thats two quotes Me!Patient_ID.DefaultValue = cQuote &...

Create renamed copy of file in same directory
Hi everyone, this is my first post here and yes, I'm a powershell newbie. I could not find a solution to my problem online, and I am not getting my little command to work - perhaps someone here is kind enough to offer some advice. :) The task: say I have 3 .jpg files and one tmp-file in my folder c:\test\jpgs\ File 1: house.jpg.test.jpg File 2: roof.jpg.test.jpg File 3: bird.jpg.test.jpg TmpFile: somefile.jpg.test.tmp (please note that I am aware of .jpg showing up twice in each of the actual image files, but ideally I would want this script to only find the file extensions...

Multiselect Listbox for Creating Pivotcharts
Running Acess 03 in Win XP sp2. I have a form containing a listbox with multiselect option. The idea is to allow the user to select from the list all the items for which they want to print data in chart format. I have a report and want create subreports within (number of subreports equal to number of items selected in listbox). Each subreport is a pivotchart for one item selected. The problem is that the pivotcharts created contain no data when multiselect is on. I can turn off multiselect and create one subreport/chart with data. I can loop through the selected items, trap the data fro...

Restoring EXCH 5.0 to different hardware / creating blank .edb files
I'm trying to test an upgrade of Exchange 5.0 (with SP2 + fixes) to 5.5 (yeah, I know...cutting edge or what). I have restored the mail server to an old Proliant 400 (bless ya, ebay!), and managed to work around the hardware differences to get it to boot. The NETLOGON, System Attendant and Directory services all start with no problems or warnings, and I can run the Exchange Admin program as long as I don't try to do anything IS related. The server is a BDC so has a copy of the SAM database for permissions, etc. Here's the thing: I don't have enough disk space to restore the pr...

How to create 'runtime' files for users w/o Access ?
What do we have to have to create a 'runtime' file so we can distriburte our Access application to people who do not have MS Access on their machine? Thanks for any help. Microsoft Access (Office) Developer Edition FAQ http://www.granite.ab.ca/access/developereditionfaq.htm Microsoft Access (Office) Developer Edition Versions http://www.granite.ab.ca/access/developereditionversions.htm Basics for Building Microsoft Office Access 2003 Runtime-Based Solution (generally applicable to all Runtime Solutions regardless of version) http://msdn2.microsoft.com/en-us/library/aa167800(of...

HELP: How to create an OR condition in Outlook email rules
I am trying to create an email rule with more then one condition with "OR" relationship between the conditions but all I can get is an "AND". I used Outlook Express and that was no problem there. I'm looking for the same thing. OR statements are key to creating effective rules. I don't quite understand why it wasn't included... morlock93 "Joseph Fern" <anonymous@discussions.microsoft.com> wrote in message news:080e01c39cab$61e368e0$a001280a@phx.gbl... > I am trying to create an email rule with more then one > condition with "...

can i create a school magazine with publisher?
i'm given a project to create a annual school magazine.....will publisher2003 help in this? any hints and solutions please? It can do the job but I'd check with the printer first and ask what file formats they accept. Specifically what kind of help do you want? -- JoAnn Paules MVP Microsoft [Publisher] "gbt1000" <gbt1000@discussions.microsoft.com> wrote in message news:7C38BB9A-358C-459A-AB0B-6C82ABBBB3C8@microsoft.com... > i'm given a project to create a annual school magazine.....will > publisher2003 > help in this? any hints and solutions plea...

Mailbox Manager Question #3
I've created a new mailbox manager recipient policy. Now that it's created it is listed at the bottom of the list after all of my other recipient polices. The menu to move it up the list is greyed out and the same menu on the policy above it is also greyed. So, I cannot move it up the list so that it gets applied. Any ideas? What are the priorities of the two Policies? "SilverICE" wrote: > I've created a new mailbox manager recipient policy. Now that it's created > it is listed at the bottom of the list after all of my other recipient > police...

How use Property sheet from a DLL library?
Hi, All, I want to create a common extension DLL library that only includes one property Sheet with more than one property pages. this DLL also includes a invoke API that can be called by Win32 application. my problem is that I can't Add property pages to property sheet and error message shows Resource was unvailable inside invoke API. below is some sample code: In MyProp.dll includes these: 1) void InvokeApi(HWND Hwnd, HINSTANCE hLib, ...); 2) class CPage1: public CPropertyPage{ ...} 3) class CPage2: public CPropertyPage{ ...} 4) class CMySheet: public CPropertySheet{ ...} here is I...

Creating a counter that does not include hidden rows
I am using a simple counter to apply #'s to a list of notes in Excel. For example... 1) If anchor is .... 2) When using... 3) Always.... The note numbers are in one column while the notes themselves are in another. I have a simple counter function that automatically numbers the notes... first cell in counter =1, all other cells below equal the previous cell +1 (i.e. =B3 +1). I would like to rewrite this counter such that if the row is hidden it would equal zero.... I know this won't work as written but this is what I have experimented with... (Referring to Cell B3) =IF(...

Multiple mfc activex controls in one dll
In VS6, there was a possibility to define up to 4 controls, when creating a new activex project. No such possibility in VS2005. Is there any way in 2005 to add an addtional one to an existing MFC ActiveX project? Any pointers will be appreciated! ...

Creating a General Inbox
Hi everyone, I wanted to know if there was a way to create a general Inbox in Outlook 2010. Multiple accounts in 2007 used to always go to a single Inbox (which I'm sure a lot of people found annoying, but I enjoyed it since it was a one stop shop for my e-mail). Thanks in advanced. Justin Submitted via EggHeadCafe - Software Developer Portal of Choice SQL Server - Save Image To Database in .NET http://www.eggheadcafe.com/tutorials/aspnet/2bf7b290-615b-4a03-acb9-5307357e0fef/sql-server--save-image-t.aspx Justin Louie wrote: > I wanted to know if there was a way to...

How do I change or create different watermark optons for printing.
The information in this post by Ron de Bruin may help you: http://groups.google.ca/groups?&selm=eNBu4T9rEHA.896%40TK2MSFTNGP12.phx.gbl Bob wrote: -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Help with Online Services Manager
Hello, I am trying to configure online setup for Fidelity Netbenefits. It is listed as a supported institution on msn.com but I don't see it inside Money 2003. How do I fix this? Is there a way for Money to download updated list of supported institutions? I would appreciate any help. In microsoft.public.money, jtanvi wrote: >Hello, > >I am trying to configure online setup for Fidelity Netbenefits. It is listed >as a supported institution on msn.com but I don't see it inside Money 2003. > >How do I fix this? Is there a way for Money to download updated list of...

Internal RMA is not creating Inventory Transfer
All the information I have read says that when you process an internal RMA the only difference is that it creates the RMA and a inventory transfer. When I process an internal RMA the RMA is created but it never creates the transfer. The item stays in main but is allocated. ...

upgrade issue: compile error after upgrade from VC7.1 to VC8, may related with import msado15.dll or cdosys.dll
When I upgrade an exe project from VC7.1 to VC8, it says upgrade succeed. But When I try to compile the project, it outputs a lot of errors. c:\dev\main\shared\impress\debugu\msado15.tlh(1024) : error C2327: 'CDO::_ADO::Properties' : is not a type name, static, or enumerator c:\dev\main\shared\impress\debugu\msado15.tlh(2086) : error C2327: 'CDO::Command15::Parameters' : is not a type name, static, or enumerator c:\dev\main\shared\impress\debugu\msado15.tlh(2285) : error C2327: 'CDO::Connection15::Errors' : is not a type name, static, or enumerator c:\dev\main\shared\...

Trouble with creating tab stops
This should be very simple but haven't found the answer in all the posts. Following the "Create or modify a tab stop" instructions I can't get the first tab stop to respond to anything but flush left. Center, Decimal, Flush Right all do not seem to work. I'm sure it is simple and something I should be able to do. My many searches re-phrasing to advance the search only take me back to "Create or modify.....". Version? "Midge" <Midge@discussions.microsoft.com> wrote in message news:A46B5D82-E1FC-42B5-9514-DD271E0BE086@microsoft.com... >...

Create Outlook mailing list ex contacts
I wish to make a number of mailing lists in my outlook contact section. Please give me "how to" answer in GREAT detail. I am new to Microsoft Outlook which I am enjoying tremendously File->New->Distribution list. How much more detail do you need?? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, jirehtrust asked: | I wish to make a number of mailing lists in my outlook contact | section. Please give me "how ...

call report from form
I need call 1 personalize report from windows GP. In vba I do connect to the class where the object in this case the report that I created. What would be the class for this purpose I have an example of how to call GP reports from VBA. It uses an unsupported technique of calling Dexterity Sanscript from VBA, but works well. Please have your partner email me at the address below (remove the online. first) and let me know the version needed (v8, v9, v10). David Musgrave [MSFT] Senior Development Consultant Escalation Engineer - Great Plains Microsoft Dynamics Support - Asia Pacific Mic...

Add Analytical Accounting fields to Integration Manager
Hi all, A similar subject was created 8 months ago, and is now closed. I was wondering whether the situation had changed in between ? Basically I am working on a project where we will extensively use AA, and several integrations. Sadly Integration Manager does not cover AA in standard, and I would need to design GL, POP, RM and IC integrations where the associated distribution also imports AA information. Has anyone been able to enhance standard IM Destinations to cover AA information ? Or aletrnatively, does anyone have any experience of covering this using eConnect ? My solution of choice...

Error when calling the On Load event of my subform
I'm trying to call the Form_Load event of my subform (frmReferrals) from the On Current event of my main form (frmPatients). I have this working in another database but can't figure out the problem in this new one. The OnCurrent code for frmPatients is: ### If IsNull(Me.PatientID) Then Me.frmReferrals.SetFocus Me!frmReferrals.Form!txtVisit1.Visible = False ... etc. Else Me.frmReferrals.SetFocus Me.frmReferrals.Form.Form_Load ' <<<< this is the problem line End If ### When it evaluates to Else, I get this error: Run-time error 2465: Application-d...

MSO9.DLL
HI, I'M TRYING TO GET MY MICROSOFT EXCEL TO WORK AND IT'S DISPLAYING THAT A REQUIRED FIELD; MSO9.DLL, WAS NOT FOUND, I CAN'T FIND A PLACE TO UPDATE MY EXCEL TO DOWNLOAD IT OR EVEN FIND A PLACE TO FIX IT. MUCH APPECIATED FOR ANY HELP. IF ONE WOULD WANT TO, PLEASE WRITE ME AT RAYMROBERTS@HOTMAIL.COM, THANK YOU VERY MUCH This link may help if repair is required :- http://support.microsoft.com/?kbid=306400 Otherwise do a Google search for MSO9.DLL - which seems be prone to al sorts of problems -- Message posted from http://www.ExcelForum.com ...

Creating a Timesheet in Project Server 2007using PSI and impersona
I am attempting to create a timesheet for a user in project server. I can create the timesheet but it is a surrogate timesheet. I have have checked the headers generated from ImpersonateTSByResUID, however the timesheet is still created as a surrogate. Am I missing anything here? I have already looked at the examples on MSDN but am still not able to succesfully create the timesheet as the correct user. Thanks in advance for any help! TimesheetDerived timesheetDerived = null; timesheetDerived = ImpersonateTSByResUID(resDS.Resources[0].RES_IS...

Where does "Create Return" option on Extras come from?
What causes the "Create Return" option on the Extras>Additional menu of the Sales Transaction Entry screen to appear? I can see (and use) it on my workstation, but I have another user who can't, and I can't figure out what gives access to it. -- Bud Cool, Accounting System Manager HDA, Inc. Hazelwood, MO GP 9.0, SP2 Bud, That comes from the Field Service Module. -- Tim Foster "Bud" wrote: > What causes the "Create Return" option on the Extras>Additional menu of the > Sales Transaction Entry screen to appear? > > I can see ...