Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Ich habe einen COM – Server erstellt, welcher zwei void Methoden besitzt. Nun möchte ich die Methoden von einem C++ Programm aus aufrufen. Von Basic aus funktioniert es, allerdings weiß ich nicht, wie ich das in c++ machen kann.

Kann mir da jemand helfen?

Du meins also:

#import "comServer.h"

Und dann? :confused: Kannst du vielleicht ein C++ Codebeispiel geben?

Nennen wir einfach den ComServer comserver und die aufzurufende Methode einfach Methoder(long variable1, float Variabel2).

Ein Codebeispiel wäre echt super.

Du meins also:

#import "comServer.h"
Nein. Wenn du eine (generierte) Headerdatei hast, musst du die mit #include einbinden. Eine Typbibliothek (.tlb) bindest du mit #import ein.

#include <windows.h>
#include <atlbase.h>

#import "comserver.tlb"
// ODER
#include "comserver.h"

int main()
{
CoInitialize(0);
{

CComPtr<Icomserver> p;
HRESULT hr = p.CoCreateInstance(__uuidof(comserver));
if(SUCCEEDED(hr))
{
p->Methoder(1, 42.0);
}
}
}
[/code]

Vielen Dank!

Ich werde es direkt mal ausprobieren, aber denke, dass ich es mit den Beispielen hinbekomme ;)

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.