|
Thanks for your reply, maybe there is something I did not express very clear. Here is the thing, I was asked to develop a third-party app by using the API of "TCS" which is a app developed by Nokia, it is short for Tetra Connectivity Server and basically a programm used in telecommunication. By adopting this "#import XXX/tcsapi.dll" in my code, I can freely used the api of it(e.g getVoiceCall()). The __uuidof(TCSUser) has value and can be checked in the registry, but the error still be there.
|
|
|
|
|
It's impossible to guess why that may be happening; maybe you should try re-installing the library. Alternatively, ask Nokia for assistance.
|
|
|
|
|
I was developing a context menu handle on windows OS. I followed the website guide "The Complete Idiot's Guide to Writing Shell Extensions - Part I[^]", and can show my own submenu item when right-click a shorcut. But I want remove the other submenu items, such as "copy", "open", "zip" and so on. May any body tell me how to do it? thx a lot.
|
|
|
|
|
Hi all,
I'm absolutely no expert with COM but I have a (maybe very easy) question to you.
I have a .dll file and would like to call some functions out of that. So I've created now a .tlb file out of the .dll with the command:
regasm XYZ.dll /tlb
This worked great and now I could also create the .tlh file out of this .tlb If I add this line in my C++ code:
#import "XYZ.tlb" named_guids raw_interfaces_only
and recompile the project.
That all worked great right now. But now I have the problem how I must call this part in my code to use the functions out of this .dll file?
I know that it should work with the CoCreateInstance(...) function but I don't know what parameters I must set there exactly?
Maybe I could send to someone my little example and he could help me? I thinks this should be no problem for an expert?
In this forum it's not possible to add a little attachment .
Thanks for any help!!!
Regards,
Jürgen
|
|
|
|
|
|
Yes, I've read this page and it works also for another project. But this time I have another one and I don't know exactly how I can go on with this one . Could you take a look at the project I have? Just a few minutes. That would be really great!!!
|
|
|
|
|
I'm having trouble getting an Access plugin working for all users. The setup application installs/registers the dll and associated tlb file absolutely fine (installed for all users) and my VBA code (below) also works successfully when logged in as an administrator, but attempting to use it under a non-privileged user account fails here:
Private Sub Form_Load()
With COMAddIns("MyPlugIn.Connect")
.Connect = True
.Object.HookupControls cmdUploadImage
End With
End Sub
The returned error is: This add-in is installed for all users on this computer and can only be connected or disconnected by an administrator.
Is there any way to prevent this?
Some additional information:
- The dll/tbl and setup application are all created in C# (.net 3.5)
- The target machine is virtualised, so any user could potentially log into it (thus installing the plugin for the active user isn't an option... though if there's a way to silently install the file in a user login script that might work?)
Thanks in advance... though I'm more hopeful than expectant! 
|
|
|
|
|
I'm testing Viscomsoft powerpoint viewer ActiveX in demo version.
Using example code I loaded a ptt, but when press next slide in the last slide, powerpoint show a save dialog.
What could i do to remove that dialog?
Im trying to make a "safe" viewer for Powerpoint/Excel files, in which the final users can see the files but they cannot save its.
I made an encryption software for mask the ptt and excel files and the other issue its, If the ptt has a link to an excel file, the activeX open Excel and I want to catch the press link to open the excel file inside my program.
Is there any way to catch the link click event?
|
|
|
|
|
In the "Dynamic Selection of a Component" section of the book <com+ programming="" -="" a="" practical="" guide="" using="" visual="" c++="" and="" atl="">, there is an example teach me to load dll dynamically. Here is my code:
It couldn't run. I guess error in the file "tv.cpp". This code couldn't return a function pointer(I print the value of proc, and computer shows that proc = 0): "CREATEVCRPROC proc = reinterpret_cast<createvcrproc>(GetProcAddress(h, "CreateVcr"));"
PS: I use Microsoft C++ Compiler to compile this files
> cl -c tv.cpp
> cl -c vcr.cpp
> link -dll vcr.obj
> link tv.obj
Could anyone help me? Thank you very much!!
#include "video.h"
class CVcr : public IVideo{
public:
CVcr(void);
long _stdcall GetSignalValue();
void _stdcall Delete();
private:
long m_lCurValue;
int m_nCurCount;
};
#include "vcr.h"
CVcr::CVcr(){
m_lCurValue = 5;
m_nCurCount = 0;
}
long CVcr::GetSignalValue(){
m_nCurCount++;
if(5 == m_nCurCount){
m_lCurValue = 5;
m_nCurCount = 1;
}
long lReturnValue = m_lCurValue;
m_lCurValue += 10;
return lReturnValue;
}
IVideo * _stdcall CreateVcr(void){
return new CVcr;
}
void CVcr::Delete(){
delete this;
}
class IVideo{
public:
virtual long _stdcall GetSignalValue() = 0;
virtual void _stdcall Delete() = 0;
};
extern "C" IVideo * _stdcall CreateVcr();
#include "video.h"
#include <iostream>
#include <windows.h>
using namespace std;
IVideo * CreateInstance(char * pszDll){
typedef IVideo * (_stdcall * CREATEVCRPROC)(void);
HINSTANCE h = LoadLibrary(pszDll);
CREATEVCRPROC proc = reinterpret_cast<CREATEVCRPROC>(GetProcAddress(h, "CreateVcr"));
printf("proc = %d", proc);
return (*proc)();
}
int main(int argc, char* argv[])
{
int i;
IVideo * pVideo = CreateInstance("vcr.dll");
for(i=0; i<10; i++) {
long val = pVideo->GetSignalValue();
cout << "Round: " << i << " - Value: " << val << endl;
}
pVideo->Delete();
return 0;
}
|
|
|
|
|
|
I want to simulate click event on object element in php page to upload a file. The object's html like this:
<OBJECT id=SWFUpload_0 class=swfupload data="/resource/uploadify/uploadify.swf?r=0.9973842346623738&preventswfcaching=1404983334542" width=160 type=application/x-shockwave-flash height=30 SelectFile="null" SelectFiles="null" StartUpload="null" ReturnUploadStart="null" StopUpload="null" CancelUpload="null" RequeueUpload="null" GetStats="null" SetStats="null" GetFile="null" GetFileByIndex="null" AddFileParam="null" RemoveFileParam="null" SetUploadURL="null" SetPostParams="null" SetFileTypes="null" SetFileSizeLimit="null" SetFileUploadLimit="null" SetFileQueueLimit="null" SetFilePostName="null" SetUseQueryString="null" SetRequeueOnError="null" SetHTTPSuccess="null" SetAssumeSuccessTimeout="null" SetDebugEnabled="null" SetButtonImageURL="null" SetButtonDimensions="null" SetButtonText="null" SetButtonTextPadding="null" SetButtonTextStyle="null" SetButtonAction="null" SetButtonDisabled="null" SetButtonCursor="null" TestExternalInterface="null"></OBJECT>
Now, I can get the object's pointer and can get it's properties correctly, but when call click method, it returns S_OK without any effect, the upload dialog doesnot appear.
I doubt where the question is, can somebody help?
Thank you for your time.
|
|
|
|
|
I make simple com exe server using win32 application, but when i used winconsole application it gives me error i.e com component can not be created, is there any change in settings of visual studio or in code.
plz help me out.
|
|
|
|
|
Hi, Member 9899644,
Your post provides no real information about your simple com exe server. It is impossible to diagnose your problem. There are so many possibilities for error that I'm not even going to try to guess.
|
|
|
|
|
I am trying to build Simple COM Exe Server which provide single interface and interface has one method, when client called the Exe Server then using the command line parameter server guess that client is of regular(show window) client or COM(want interface pointer) client. If client is of COM client then method which is register Class Factory object is get called using CoRegisterClassObject() class factory object is registered and object of Concrete class is created and return the interface pointer. this all is done, but when i make COM Exe server usssing Console application (template in visual studio) then CoRegisterClassObject()is not create the concrete class object and not return interface pointer.
Is there any changes when we create exe server as win32 application and console application.
|
|
|
|
|
Member 9899644,
Sorry for not replying to your post, I completely forgot about it.
It sounds as though you are just learning about COM and it's associated functionality. This can be very difficult, because, typically, all you need to do is ignore one aspect of the creation and activation paradigm, and the whole thing just fails to operate as expected (and, you have no idea why).
When I was first trying to understand COM (syntax and the reasons it was designed in such a way), I found that reading Don Box's book: Essential COM was extremely helpful. You need an overview, and you need to understand why COM does what it does, and, to read some example source code.
As I recall, there are some excellent articles right here on the CodeProject about registering a COM server. Also, you don't mention how your COM client activates the object,...this is typically done with CoCreateInstance.
This is an excellent introductory series to COM: The COM Macro-Architecture Topology,
...and,...COM Macro Architecture Topology - Servers,
...and,...COM Macro Architecture Topology - Clients,
and,...COM IDs & Registry Keys in a Nutshell.
...Also, Michael Dunn has an excellent series on COM: Introduction to COM - What It Is and How to Use It., and,...
Introduction to COM Part II - Behind the Scenes of a COM Server
Several incredibly informative articles about COM are written by: Lim Bio Liong
Understanding The COM Single-Threaded Apartment Part 1,
...and,...Understanding The COM Single-Threaded Apartment Part 2
Jeff Glatt also has an excellent series: COM in plain C
COM in plain C, Part 2
COM in plain C, Part 3
COM in plain C, Part 4
COM in plain C, Part 5
COM in plain C, Part 6
COM in plain C, Part 7
...and, COM in plain C, part 8
In fact,...there is a HUGE list of CodeProject articles about COM: COM / COM+
modified 5-Aug-14 18:40pm.
|
|
|
|
|
i'm using the reference Microsoft.Office.Interop.Visio to create a visio drawing document. When trying to obtain a visio application in my c# program as follow : "Application application =new Application()", i got the error below:
La récupération de la fabrique de classes COM pour le composant avec le CLSID {00021A20-0000-0000-C000-000000000046} a échoué en raison de l'erreur suivante : 80040154 Classe non enregistrée (Exception de HRESULT : 0x80040154 (REGDB_E_CLASSNOTREG)).
When using the same type of reference such as "Microsoft.Office.Interop.Word" or "Microsoft.Office.Interop.Excel" everything works properly. Any suggestion on how to address this issue will be really appreciated. Thanks!!
|
|
|
|
|
The message is clearly telling you what is wrong: Visio is not installed on your system.
|
|
|
|
|
Thanks for your reply.
I have visio installed on my system trough Microsoft Virtualization application.
That is why, the COM for visio is not found comparing to the COM for Word or Excel which i directly installed on my system(locally installed).
How to access visio objet which is installed on a virtual server as it is my case from my c# program.
Any idea! Thanks
|
|
|
|
|
Well, as the message clearly states, Visio is not installed on the system that you are trying to access it from, so you have no choice but to install it. The real system and the virtual system are totally separate entities.
|
|
|
|
|
Ok, since it's still a Microsoft technology (i mean the virtualization application for software ), is there any way to access Visio without having to install its on my real system?
The fact is that the application Virtualization is an application streaming solution and i run visio manually without any issue.
Thanks for your interest and constribution 
|
|
|
|
|
Member 10825675 wrote: is there any way to access Visio without having to install its on my real system? No, As I said before the two systems are entirely separate; it is the same as having two different PCs.
|
|
|
|
|
I installed a visio trial version and everything works perfectly!
Thus i will need to locally install visio on each sytem of my network instead on having its installed on a server and using client app to acess its in order to run my soft. This is the issue actually.
Anyway, thanks for your valuable contribution.
|
|
|
|
|
I faced the same error while accessing it from server.
what i did is, changed the application pool identity in application pool on IIS.
Identity should be the one which has administrator rights to use that application where it is installed.
It worked fine after that.
Hope it works for you too.
|
|
|
|
|
Where can I update the edit field to reflect changes of the file name to save?
I have customized my save file dialog and use CFileDlgEventHandler. There i need to set a different filename.
In the file save dialog I select a filename from existing files, e.g. blah.tif. After clicking a custom checkbox I need to set e.g. blah_C1.tif. I can get and set the filename inside the handler:
CComQIPtr pDlg = pfdc;
pDlg->GetFileName(...) and pDlg->SetFileName(...) work,
but after clicking 'Save' I get the filename previously selected (blah.tif) and not the changed one.
Anyone out there with a tip to update the edit control behind the scenes?
|
|
|
|
|