Click here to Skip to main content
15,887,964 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Java in comparison to C++ Question Pin
Christian Graus18-Nov-02 18:59
protectorChristian Graus18-Nov-02 18:59 
GeneralRe: Java in comparison to C++ Question Pin
Joaquín M López Muñoz18-Nov-02 19:57
Joaquín M López Muñoz18-Nov-02 19:57 
GeneralRe: Java in comparison to C++ Question Pin
Swinefeaster18-Nov-02 20:17
Swinefeaster18-Nov-02 20:17 
GeneralRe: Java in comparison to C++ Question Pin
Joaquín M López Muñoz18-Nov-02 20:52
Joaquín M López Muñoz18-Nov-02 20:52 
GeneralRe: Java in comparison to C++ Question Pin
Swinefeaster18-Nov-02 21:21
Swinefeaster18-Nov-02 21:21 
GeneralRe: Java in comparison to C++ Question Pin
Joaquín M López Muñoz18-Nov-02 21:59
Joaquín M López Muñoz18-Nov-02 21:59 
GeneralRe: Java in comparison to C++ Question Pin
S van Leent19-Nov-02 7:36
S van Leent19-Nov-02 7:36 
GeneralRe: Java in comparison to C++ Question Pin
Swinefeaster18-Nov-02 21:58
Swinefeaster18-Nov-02 21:58 
ok i got it! check it out, a java implentation of a c++ pointer! Smile | :)

public class CPointer<br />
{<br />
  public CPointer()<br />
  {<br />
    m_TargetObject = null;<br />
  }<br />
<br />
  public CPointer(Object TargetObject)<br />
  {<br />
    m_TargetObject = TargetObject;<br />
  }<br />
<br />
  // Sets the pointer to null.<br />
  public void nullIt()<br />
  {<br />
    m_TargetObject = null;<br />
  }<br />
<br />
  // Returns true if the pointer is pointing to null.<br />
  public boolean isNull()<br />
  {<br />
    boolean isNullResult = false;<br />
<br />
    if(m_TargetObject == null)<br />
    {<br />
      isNullResult = true;<br />
    }<br />
<br />
    return isNullResult;<br />
  }<br />
<br />
  // Points the pointer at the given target object.<br />
  public void pointAt(Object TargetObject)<br />
  {<br />
    m_TargetObject = TargetObject;<br />
  }<br />
<br />
  // Returns the the object being pointed at.<br />
  public Object unwrap()<br />
  {<br />
    return m_TargetObject;<br />
  }<br />
<br />
  // The target object the pointer is pointing at.<br />
  private Object m_TargetObject;<br />
}<br />


so we just need to go:

  public boolean receiveAndUnmarshallInvoke(CRmiInvokeMessage InvokeMessage,<br />
   ServerSocket ListenSocket, CPointer ReturnedClientSocketPointer)<br />
  {<br />
    boolean success = false;<br />
<br />
    if(ListenSocket == null)<br />
    {<br />
      System.err.println("Null ListenSocket passed in CRmiCommunicator.receiveAndUnmarshallInvoke().");<br />
    }<br />
    else<br />
    {<br />
      try<br />
      {<br />
        Socket TheClientSocket = ListenSocket.accept();<br />
<br />
        // .....<br />
<br />
        ReturnedClientSocketPointer.pointAt(TheClientSocket);<br />
      }<br />
      catch (Exception e) <br />
      {<br />
        System.err.println("Socket failure (" + e.getLocalizedMessage()<br />
        + ") in CRmiCommunicator.receiveAndUnmarshallInvoke().");<br />
      }<br />
    }<br />
<br />
    return success;<br />
  }<br />
<br />


Smile | :)

Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
GeneralRe: Java in comparison to C++ Question Pin
Alexandru Savescu19-Nov-02 4:18
Alexandru Savescu19-Nov-02 4:18 
GeneralRe: Java in comparison to C++ Question Pin
Alvaro Mendez19-Nov-02 5:25
Alvaro Mendez19-Nov-02 5:25 
GeneralRe: Java in comparison to C++ Question Pin
Swinefeaster19-Nov-02 14:29
Swinefeaster19-Nov-02 14:29 
GeneralMouse hover question Pin
David Ensminger18-Nov-02 16:42
David Ensminger18-Nov-02 16:42 
Generala question about two CPU... Pin
liuty200618-Nov-02 16:27
liuty200618-Nov-02 16:27 
GeneralRe: a question about two CPU... Pin
Christian Graus18-Nov-02 16:59
protectorChristian Graus18-Nov-02 16:59 
GeneralRe: a question about two CPU... Pin
liuty200618-Nov-02 17:57
liuty200618-Nov-02 17:57 
GeneralRe: a question about two CPU... Pin
Christian Graus18-Nov-02 18:01
protectorChristian Graus18-Nov-02 18:01 
Questiontrigger erase of background? Pin
Anonymous18-Nov-02 16:25
Anonymous18-Nov-02 16:25 
AnswerRe: trigger erase of background? Pin
Christian Graus18-Nov-02 16:36
protectorChristian Graus18-Nov-02 16:36 
GeneralRe: trigger erase of background? Pin
Anonymous18-Nov-02 16:47
Anonymous18-Nov-02 16:47 
GeneralRe: trigger erase of background? Pin
Christian Graus18-Nov-02 16:57
protectorChristian Graus18-Nov-02 16:57 
GeneralRe: trigger erase of background? Pin
Anonymous18-Nov-02 19:08
Anonymous18-Nov-02 19:08 
GeneralRe: trigger erase of background? Pin
Anonymous18-Nov-02 19:36
Anonymous18-Nov-02 19:36 
GeneralMDI: Not opening a new document on startup Pin
Le centriste18-Nov-02 16:15
Le centriste18-Nov-02 16:15 
GeneralRe: MDI: Not opening a new document on startup Pin
Dave Bryant18-Nov-02 17:28
Dave Bryant18-Nov-02 17:28 
GeneralRe: MDI: Not opening a new document on startup Pin
Le centriste19-Nov-02 16:27
Le centriste19-Nov-02 16:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.