Source file: /~heha/BETA/matdde32.zip/SRC/DDETERM.PAS

library ddeterm;
uses PasMex32,Windows,DDEML,dde_init;
{jede dieser DLLs auf andere Basisadressen relozieren}
{$IMAGEBASE $10010000}

procedure mexFunction(nlhs:LongInt; var plhs:TMatArr;
  nrhs:LongInt; const prhs:TMatArr); stdcall;
 var
  conv:HConv;
  ok: Bool;
 begin
  TestInputArgs(nrhs,prhs,1,1,0,1);
  conv:=Round(mxGetScalar(prhs[0]));

  ok:=DdeDisconnect(conv);
  if ok then advDeleteInfo(conv,0,0);	{alle Advises totlegen}

  plhs[0]:=mxCreateDoubleMatrix(1,1,mxReal);
  mxGetPr(plhs[0])^:=LongInt(ok);		{BOOL-Rückgabe}
  mxSetLogical(plhs[0]);			{neu bei Matlab5}
  HandleDdeError(0);		{falls etwas schiefging: anzeigen!}
 end;

exports
 mexFunction;
begin
 DisableThreadLibraryCalls(HInstance);
end.
Detected encoding: OEM (CP437)1
Wrong umlauts? - Assume file is ANSI (CP1252) encoded