|
Hi
I would like to create a COM which is used to generate PDF from HTML content ..
but i don't have any idea on creating com for pdf ..
can anybody give me some fundamentals of creating com for pdf ..
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
Hi every body
I am doing a project in which I have a Windows Certificate Authority server and RADIUS server (IAS RADIUS server under windows ) . In this project the clients will login to the domain and get certificates from CA. I know this can be done through Windows configuration, but it's not good. I want to understand what is going behind, so I want to develop my own code. In brief, My question is :
I want to do certificate enrollment and request through C# program. I saw many codes in websites. They are using XENROLL.dll library to do enrollment, but I couldn't understand. Sorry I am still new in C#, so I need any tutorial or guide about this to guide me how can I do it.
I don't know from where these guys got tutorials about Certifcate enrollment, request ...... etc
It's hard to start a project on this without deep understanding of the methods used and classes.
Here is an example of the codes I found. This to give you a total figure of what I mean. Of course, this code is not complete and probably has some mistakes.
*****************************
int creationState;
string CertificateTemplate = "My Certificate Template";
string ProviderName ="Microsoft Enhanced Cryptographic Provider v1.0";
string EmailCertOID = "1.3.6.1.5.5.7.3.4" ; //Email certificate
// creating cert request:
XENROLLLib.CEnroll certEnroll = new XENROLLLib.CEnroll();
certEnroll.GenKeyFlags = 1024 * (256*256);
certEnroll.GenKeyFlags = CRYPT_EXPORTABLE;
certEnroll.UseExistingKeySet = 0;
certEnroll.ContainerName() = cert;
certEnroll.addCertTypeToRequest (CertificateTemplate);
certEnroll.ProviderName =ProviderName;
string dn = "CN="+ CommonName.Text +",E="+ Email.Text +",O="+
Organisation.Text +",L="+ Stadt.Text +",S="+ State.Text
+",C="+Countrycode.Text+"";
string req = certEnroll.createPKCS10(dn, EmailCertOID);
int CR_IN_BASE64 = 0x1;
int CR_IN_PKCS10 = 0x100;
CERTCLIENTLib.CCertRequest certRequest = new CERTCLIENTLib.CCertRequest();
creationState = certRequest.Submit(CR_IN_BASE64 | CR_IN_PKCS10, req,
"", @"Certserver\MyCertCA");
***************************************
Please Please Please if any one know something about this PLEASE AGAIN guide me. It is toooo urgent. I have just two months to submit the project.
Please I need at lease a tutorial.
Thanx to ALL
|
|
|
|
|
Can anybody help in how to implement print preview in XOffice source code. Interface is 'IInplacePrintPreview' and method is 'StartPrintPreview'.
|
|
|
|
|
I have a DCOM based project.
I use RPC to query database(using SQL Server 2000).
But when the Server program run on Windows 2000 server,the client using the data querying well,that I mean query speed is not slow.
But when I run the service on Windows 2003 Server,the client's query speed is almost as slow as 1 of 8 of running in Windows 2000 Server.
Someone would tell me Why?
Thanks.
GOOD LUCK
|
|
|
|
|
Hi,
I guess that I should use IDockingWindow::ShowDW method, but how do I get
pointer to IDockingWindow ? I want to show/hide Quick Launch deskband.
thanks
Vilius
|
|
|
|
|
I am working on a tool the uses .net to automate a com program. ESRI ArcDesktop to be exact. My production box started failing on my nightly runs. I get an Exception from HRESULT: 0x80041018 which all I can find is this: http://msdn2.microsoft.com/en-US/library/aa383513.aspx
Which states that :
WBEM_E_INVALID_QUERY_TYPE The requested query language is not supported
2147749912
0x80041018
Does anybody have any ideas?
.net code below
<br />
Private Function PackagePMF(ByVal strPMFFile As String, ByVal strPackageDIR As String) As Boolean<br />
Dim pPE As IPMFPackage<br />
Dim pSettings As IPropertySet<br />
Dim pCancel As ITrackCancel<br />
Dim pArray As IStringArray<br />
Dim strFullPMF As String<br />
<br />
Try<br />
ts.TraceEvent(TraceEventType.Verbose, 0, "StartPackage Function " & Now)<br />
pPE = New PackagerEngineClass()<br />
pSettings = pPE.GetDefaultPackagerSettings()<br />
pCancel = New CancelTracker<br />
pArray = New StrArray<br />
<br />
'All Vector data will be converted to Shapefile.<br />
'All Raster data will be converted to ERDAS Imagine.<br />
pSettings.SetProperty("Vector Clip Type", esriAPEVectorClipType.esriAPEVectorClipTypeCopyDataset)<br />
pSettings.SetProperty("Raster Clip Type", esriAPERasterClipType.esriAPERasterClipTypeCopyRaster)<br />
pSettings.SetProperty("Package Directory", strPackageDIR)<br />
Debug.WriteLine("Package Setting Set: " & Now)<br />
<br />
'Specify the name of the pmf to be packaged<br />
ts.TraceEvent(TraceEventType.Verbose, 0, "Pmf to be Packages... " & strPMFFile)<br />
strFullPMF = strPMFFile<br />
pArray.Add(strFullPMF)<br />
<br />
'Package the pmf with the specified settings <br />
pPE.Package(pSettings, pCancel, pArray) X| Line the code fails on. X| <br />
ts.TraceEvent(TraceEventType.Information, 1, "Packaging is complete for : " & strPMFFile)<br />
Return True<br />
<br />
Catch ex As Exception<br />
ts.TraceEvent(TraceEventType.Error, 1, "PackagePMF: " & ex.Message & ex.StackTrace)<br />
Return False<br />
Finally<br />
strPMFFile = Nothing<br />
strPackageDIR = Nothing<br />
pPE = Nothing<br />
pSettings = Nothing<br />
pCancel = Nothing<br />
pArray = Nothing<br />
<br />
End Try<br />
End Function<br />
<br />
|
|
|
|
|
Hi,
Can any tell me what is the difference between BSTR, CComBSTR, _bstr_t? and which one to use when?
and also What is difference between VARIANT, CComVariant, _variant_t? and which one to use when?
Thanks
Nandu.
|
|
|
|
|
|
Hi,
Below is the list of advantages of COM. Please correct me if I am wrong and also let me now whether I covered all the advantages of COM (whether I have missed any of the major advantage of COM )
1) Ease of Application customization
2) Language independent
3) Reuse of application architecture
4) Secure access of object since it is binary format
Let me know if there is a better way to put the above advantages.
Nandu
|
|
|
|
|
Can any one reply to the above questions.
Thanks in advance,
Nandu
|
|
|
|
|
Hi,
Can any one tell me how to handle exception in COM or provide me the link where I find the relevent information.
Thanks in advance
Nandu
|
|
|
|
|
Hi Nandu,
COM does not throw exceptions as they are language specific and cannot cross the COM boundary.
What usually happens, especially if using #import (visual C++) is that a thin wraper is made around the COM function call, this detects the HRESULT failure of the COM call and throws an exception itself back to your C++ code.
Other languages may do the same, but non of them throw exceptions accross the COM boundary.
regards,
|
|
|
|
|
Hi Jonathan Wilkes,
So based on HRESULT we have to handle the sutivation.
ok..Thankyou very much.
regards,
Nandu
|
|
|
|
|
Hi Nandu,
Yes, either process the HRESULTS if using straight COM, but if using the Microsoft #import statement then use exception handling as the wrapper created by the #import call will throw exceptions if the HRESULT is not S_OK.
regards,
Jonathan
|
|
|
|
|
what is the perpose of LockServer() in IClassFactiory
|
|
|
|
|
To avoid the COM server deletion whenever the reference count goes to zero. See the MSDN documentation about http://msdn2.microsoft.com/en-us/library/ms682332.aspx[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello
I have Created the Simple ATL COM Server (.dll). and put one interface in it(called MyMath) and Add one function called Addition. I also made a simple MFC application to use the function and import the library using import "..\path\_name.lib"> and then initialize the Interface. So It gives the Compile Time Error . So I include two more files. _server.h and _server_i.c and Bam!!! Compile Time Error Gone!!.(server is the name of my ATL SERVER Project )But when I run the Programme it gives me the Run time Error as Below.
the instruction at "0X004139d8"referenced memory at "0z00000000". The memory coult not be "read"
I am Using Visual Studio .Net 2003 for making Application
So Please Help Me.
|
|
|
|
|
For the compile error try this
#import "..\path\_name.lib" no_namespace
« Superman »
|
|
|
|
|
Would you provide some relevant code ?
Prasad
MS MVP - VC++
|
|
|
|
|
Hello,
One thing that you can do is to generate the map file during the compilation and then, reading that, find the line of code that generates the crash.
An excellent article is at url:
www.codeproject.com/debug/mapfile.asp
I don't know if, in your case, my idea can be usefull, but...
|
|
|
|
|
Hello
Im trying to deploy a application created on a machine with Office2007 on a new machine witch is using Office 2003. Im not getting it... I continue getting this error...
Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
Just wondering if any of you guys know what could be wrong
Cheers
Spaz
|
|
|
|
|
Greetings.
I have created a DLL using the ATL COM AppWizard, and have successfully added a class and functions. I was also successful in create and an expose an enum by including
typedef enum {aa,bb,cc} testEnum;
in the .idl file.
PROBLEM: how do I add definitions of global members? In other words, I would like some constants, variables and functions to be immediately available to VB applications that use my dll, in the same way that the "Load" method or the "App" property become available once the a reference to VB6.olb is created.
Thanks,
zgilboa
|
|
|
|
|
Probaly, this[^] article helps you.
Prasad
MS MVP - VC++
|
|
|
|
|
Thanks. Another thing which I've found out and which solves it is the use of the IDL appobject attribute. Each coclass that has this attribute included in its IDL definition will expose all of its members as global members. Additionally, you could use this attribute with more than one coclass.
[
uuid(483771F3-DD5D-4168-8DC6-CE090E2733F8),
appobject,
helpstring("RefRate Class")
]
coclass RefRate
{
[default] interface IRefRate;
};
zgilboa
|
|
|
|
|
I have a COM dll written using ATL. There is a interface named
"IVehicle". I want to derive 2 new interfaces from this, named
"IToyota" and "IHonda". How can i do that?
The purpose of doing this is that i should be able to use functions
inside both Base interface(IVehicle) from the drived new interfaces.
Thanks in advance.
|
|
|
|