Avatar billede inkognito1 Nybegynder
28. august 2003 - 20:10 Der er 9 kommentarer og
1 løsning

Oversættelse hjælp !

Oversættelse hjælp !

En der kan kan uddybe hvad det her vil sige ??

MS compiler: extern "C" __declspec(dllexport) int WINAPI UserExit (...)
Avatar billede jinglebell Nybegynder
28. august 2003 - 21:16 #1
er du ved at rode med en telefon?
Avatar billede inkognito1 Nybegynder
28. august 2003 - 21:18 #2
Jeg har et program som har et userExit indbygget. Hver gang den gør et eller andet så sender den en USerExit med noget info.
Avatar billede inkognito1 Nybegynder
28. august 2003 - 21:19 #3
Spørgsmålet er hvordan jeg opfanger det.

det står i manualen at hvis jeg bruger windows så skal det være ligesom ovenfor.
Avatar billede jinglebell Nybegynder
28. august 2003 - 21:25 #4
http://www.netmobile.de/products/sendsms/manual.php?lang=d
Jeg kan ikke et døjt tysk men på denne side næsten nederst står der noget :)
Avatar billede inkognito1 Nybegynder
28. august 2003 - 21:27 #5
Avatar billede inkognito1 Nybegynder
28. august 2003 - 21:27 #6
det engelsk .. og det er den maunal jeg selv sidder med ...
Avatar billede jinglebell Nybegynder
28. august 2003 - 21:28 #7
ok. hmm må nok springe fra her mester, jeg ved det simpelthen ikke :(
Avatar billede inkognito1 Nybegynder
28. august 2003 - 21:28 #8
Det er specielt de stykke hvor der står:

Userexit
With the parameter -u you can specify an userexit. This is an external program or script, which will always be called by SendXMS when a message has been sent or received or when a message couldn't be sent (only if running in server mode). The called program will get the following command line arguments (USEREXITVERSION=4):
cause (1 = message sent successfully, 2 = message received successfully, 3 = message status received, 4 = message deleted, 98 = connection started, 99 = connection closed, 100 = program reinitialized, -1 = message couldn't be sent, -2 = hardware problem)
originator (oAdC)
recipient (adC)
message
count of (partial) messages required for the whole message. In case of a long SMS (<n> parts) the userexit will be called <n + 1> times (one time for each part with splitCount=(-1*<number of part>) and one time for the complete SMS with splitCount=<n>). ATTENTION: if you have set DONTREASSEMBLE=1 the userexit will be called for receiving long SMS only <n> times with splitCount=1.
used provider (from sendxms.pro)
used SMS protocol (from sendxms.pro)
used device (from sendxms.cfg)
message-ID (assigned by the SMSC or command line parameter -G (ID, timestamp or TP message reference))
DataCodingScheme (see GSM 03.38)
ProtocolIdentifier (see GSM 03.40)
UserDataHeader (command line parameter -U))(see GSM 03.40)
time elapsed for that action in seconds (dialing and initialisation is not included)
ServiceCenterTimeStamp (e.g.: Tue, 09 Jan 2001 11:22:19 +0000)
local Id (command line parameter -o)
validity period (hhmmDDMMYYYY; command line parameter -V)
deferred delivery (hhmmDDMMYYYY; command line parameter -D)
StatusReportRequested (0 or 1; command line parameter -F)
ReplyPathRequest (0 or 1; command line parameter -R)
priority (-1 indicates not specified)
tariff class (command line parameter -XTariffClass=)
service description (command line parameter -XServiceDesc=)(-1 indicates not specified)
additional codes (addCodes, see below)
additional info (addInfo, see below)
The userexit can also be a function located in a DLL or in a so-library (shared object). For that you have to separate the name of the DLL/so-library from the name of the function by a masterspace (@) (-u<dll>@<function>).
The return code of the userexit should be 0 to terminate the transaction correctly. If any value not equal 0 is returned the transaction will be aborted (a received message will not be saved and will not be deleted from the SMSC). In this case the return code should either be less then 0 (to return a default error code to the SMSC) or should contain a valid UCP error code which will be transformed automatically according to the used protocol.

A prototype for an userexit function in a shared object is:

int UserExit (int cause, char *oAdC, char *adC, char *sms, int splitCount, char *provider, char *protocol, char *device, char *msgId, int dcs, int pid, char *udh, int seconds, char *scts, char *localId, char *validityPeriod, char *deferredDelivery, int statusReportRequest, int replyPathRequest, int priority, char *tariffClass, int serviceDescription, char *addCodes, char *addInfo);

Using Windows the function should be defined like:

Borland compiler: __stdcall __declspec(dllexport) int UserExit (...)
MS compiler: extern "C" __declspec(dllexport) int WINAPI UserExit (...)

/* The MS compiler decorates the function. This results in using _UserExit@<n> to call this function (or using a def file which exports the function with a correct name). */

If the userexit requires much time you should start an own thread for processing.
Avatar billede inkognito1 Nybegynder
28. august 2003 - 21:29 #9
ok ... måske en anden kan hjælpe med hvordan jeg får det til at virke.
Avatar billede inkognito1 Nybegynder
16. november 2003 - 02:29 #10
lukker
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester