title: JNAerator - using interfaces generated by typedef
body: <p>I'm trying to use a generated interface by JNAerator from a typedef instruction, but I can't find a way to do that:</p>
  
  <p>The function in the .h file is: </p>
  
  <pre><code>MyClass::Initialize(LPCWSTR path);
  </code></pre>
  
  <p>The header file also includes the original typedef instruction:</p>
  
  <pre><code>typedef __nullterminated CONST WCHAR *LPCWSTR, *PCWSTR;
  </code></pre>
  
  <p>JNAerator generates:</p>
  
  <p><strong>Method:</strong></p>
  
  <pre><code>public native int Initialize(LPCWSTR path);
  </code></pre>
  
  <p><strong>The interface:</strong></p>
  
  <pre><code>/// Undefined type
  /// Undefined type
  public static interface LPCWSTR {
  
  };
  </code></pre>
  
  <p><strong>And the classes:</strong> </p>
  
  <pre><code>/// C type : WCHAR*
      public Pointer&lt;Short &gt; LPCWSTR() {
          try {
              return (Pointer&lt;Short &gt;)BridJ.getNativeLibrary("dlls").getSymbolPointer("LPCWSTR").as(DefaultParameterizedType.paramType(Pointer.class, Short.class)).get();
          }catch (Throwable $ex$) {
              throw new RuntimeException($ex$);
          }
      }
      /// C type : WCHAR*
      public MainLibrary LPCWSTR(Pointer&lt;Short &gt; LPCWSTR) {
          try {
              {
                  BridJ.getNativeLibrary("dlls").getSymbolPointer("LPCWSTR").as(DefaultParameterizedType.paramType(Pointer.class, Short.class)).set(LPCWSTR);
                  return this;
              }
          }catch (Throwable $ex$) {
              throw new RuntimeException($ex$);
          }
      }
  </code></pre>
  
  <p>The problem is, I don't know how to instantiate an object <code>LPCWSTR</code> using <code>Pointer</code> and the <code>LPCWSTR</code> interface, using a String, so that I can pass it to the <code>Initialize</code> method.</p>
  
  <p>How can I do this?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I modified the .h file to use <code>wchar_t*</code>:</p>
  
  <pre><code>MyClass::Initialize(wchar_t* path)
  </code></pre>
  
  <p>JNAerator generated the method like this:</p>
  
  <pre><code>public native int Initialize(Pointer&lt;Character &gt; path);
  </code></pre>
  
  <p>So I called it like this: </p>
  
  <pre><code>MyClass factory = new MyClass();
  Pointer&lt;Character&gt; path = org.bridj.Pointer.pointerToWideCString("dlls");
  factory.Initialize(path);
  </code></pre>
  
  <p>The problem is that I get the following exception: </p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: main.MyClass.Initialize(Lorg/bridj/Pointer;)I
  </code></pre>
  
  <p>at this line:</p>
  
  <pre><code>factory.Initialize(path);
  </code></pre>
  
  <p>What am I doing wrong?</p>