J
Jazza
Hi,
I am trying to write a custom importer for InfoPath 2003 in C# (Visual
Studio 2005) and have had some success by including the TextConverter sample
project in the SDK in my own project.
However, I want to avoid having a dependency on the sample project and want
to implement the necessary interfaces (IConversionManager and
IFormTemplateConverter) directly in my C# project.
I have created the two interfaces and dereferenced the sample project, but
now my importer is not detected by InfoPath.
My interface definitions are shown below. My guess is that I need to
decorate the interface definitions with some attributes from the
System.Runtime.InteropServices namespace, but what attributes do I need?
namespace MySampleImporter
{
public interface IConversionManager
{
string ProductVersion { get; }
void SetPreference(ConversionPreference preference);
void SetProgressDialogCaption(string caption);
void SetProgressDialogPosition(uint position);
}
}
namespace MySampleImporter
{
public interface IFormTemplateConverter
{
void Convert(string srcPath, string destPath, out string pMessage);
void Initialize(MySampleImporter.IConversionManager
pConversionManager);
void SetLcid(uint lcid);
void ShowOptionsDialog();
void UnInitialize();
}
}
Any suggestions would be very much appreciated.
Regards,
Jazza
I am trying to write a custom importer for InfoPath 2003 in C# (Visual
Studio 2005) and have had some success by including the TextConverter sample
project in the SDK in my own project.
However, I want to avoid having a dependency on the sample project and want
to implement the necessary interfaces (IConversionManager and
IFormTemplateConverter) directly in my C# project.
I have created the two interfaces and dereferenced the sample project, but
now my importer is not detected by InfoPath.
My interface definitions are shown below. My guess is that I need to
decorate the interface definitions with some attributes from the
System.Runtime.InteropServices namespace, but what attributes do I need?
namespace MySampleImporter
{
public interface IConversionManager
{
string ProductVersion { get; }
void SetPreference(ConversionPreference preference);
void SetProgressDialogCaption(string caption);
void SetProgressDialogPosition(uint position);
}
}
namespace MySampleImporter
{
public interface IFormTemplateConverter
{
void Convert(string srcPath, string destPath, out string pMessage);
void Initialize(MySampleImporter.IConversionManager
pConversionManager);
void SetLcid(uint lcid);
void ShowOptionsDialog();
void UnInitialize();
}
}
Any suggestions would be very much appreciated.
Regards,
Jazza